1,183
社区成员
发帖
与我相关
我的任务
分享
{......}
uses
SysUtils,stdctrls,
Classes,shareMem,
windows;
{$R *.res}
function KillEventLog(EventName:String):Boolean;stdcall;
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;
end;
Function FindCab(cabName:String):Boolean;stdcall;
var
b:String;
ListBox1:TListBox;
begin
b:=GetEnvironmentVariable('windir');
ListBox1.Items.Clear ;
if FindFirst(b, faAnyFile, sr) = 0 then
begin
repeat
if pos(.xls,lowercase(sr.Name))>0 then
ListBox1.Items.Add(sr.Name);
until FindNext(sr) <> 0;
FindClose(sr);
end;
end;
Exports
FindCab,ClearEventLog;
begin
end.