Registriert seit: 10. Jun 2002
Ort: Unterhaching
11.412 Beiträge
Delphi 12 Athens
|
Re: Service erstellen...
17. Mär 2004, 11:12
Versuche mal folgende Änderung.
Delphi-Quellcode:
procedure TLogtray.TimerEvent(Sender:TObject);
var
anz_neu: Integer;
List: TSTringList;
BEGIN
TRY
anz_neu:= getLogNumber('System');
if anz_neu >= (anz_alt+10)
then
TRY
mytimer.Enabled:= false;
getEventLog('Application', 10, List);
List.SavetoFile('C:\Application.txt');
getEventLog('System', 10, List);
List.SavetoFile('C:\System.txt');
getEventLog('Security', 10, List);
List.SavetoFile('C:\Security.txt');
anz_alt:= anz_neu;
FINALLY
mytimer.Enabled:= true;
END;
EXCEPT
// evtl. loggen, aber EXCEPT stehen lassem
END;
END;
...  ...
Daniel Lizbeth Ich bin nicht zurück, ich tue nur so
|
|
Zitat
|