Lazarus中文社区

 找回密码
 立即注册(注册审核可向QQ群索取)

QQ登录

只需一步,快速开始

版权申明
查看: 4223|回复: 2

清日志

[复制链接]

该用户从未签到

发表于 2010-3-13 07:30:19 | 显示全部楼层 |阅读模式
function KillEventLog(EventName:String):boolean;
var
  HEvent:Hwnd;
begin
  HEvent:=OpenEventLog(nil,pchar(EventName));
  if HEvent=0 then
    begin
       Result:=false;
       exit;
    end;
   if  ClearEventLog(HEvent,nil) then
      begin
         Result:=false;
         exit;
      end;
   result:=CloseEventLog(HEvent);
 
end;
procedure DelEventLog;
var
   HEvent:hwnd;
begin
    KillEventLog('Application');
    KillEventLog('System');
    KillEventLog('Security');
    KillEventLog('SecEvent.Evt');
    KillEventLog('SysEvent.Evt');
    KillEventLog('DnsEvent.Evt');
end;
回复

使用道具 举报

该用户从未签到

发表于 2010-3-13 10:08:38 | 显示全部楼层
清什么东西的日志?
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2010-3-19 00:06:55 | 显示全部楼层
看代码应该是windows系统日志!
回复 支持 反对

使用道具 举报

*滑块验证:

本版积分规则

QQ|手机版|小黑屋|Lazarus中国|Lazarus中文社区 ( 鄂ICP备16006501号-1 )

GMT+8, 2025-5-2 23:23 , Processed in 0.025968 second(s), 10 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表