Einzelnen Beitrag anzeigen

rasdark

Registriert seit: 21. Feb 2012
1 Beiträge
 
#8

AW: microsoft log parser und delphi

  Alt 21. Feb 2012, 12:11
Delphi-Quellcode:
var
    iLog : ILogQuery;
    iEventLog : ICOMEventLogInputContext;
    iRS : ILogRecordset;
    iRecord : ILogRecord;
    str : string;

procedure TForm1.Button1Click(Sender: TObject);
begin
    iLog := CoLogQueryClass.Create;
    iRS := iLog.Execute('SELECT * FROM Security', iEventLog);
    while not iRS.atEnd do
    begin
       iRecord := iRS.getRecord;
       str := iRecord.getValue('TimeGenerated');
       Memo1.Lines.Add(str);
       str := iRecord.getValue(1);
       Memo1.Lines.Add(str);
     //...
    end;
end;
  Mit Zitat antworten Zitat