Registriert seit: 6. Apr 2011
Ort: Berlin
3.070 Beiträge
Delphi 10.4 Sydney
|
AW: OpenEventLog: wie lpSourceName herausfinden?
17. Jan 2022, 09:59
Hier kommen verschiedene Handle-Werte bei rum:
Delphi-Quellcode:
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
Winapi.Windows;
var
SourceName: string;
SystemEventLogHandle,
WinDefendEventLogHandle: THandle;
begin
try
SourceName := ' System';
SystemEventLogHandle := OpenEventLog( nil, @SourceName);
Writeln(SourceName, ' : ', SystemEventLogHandle.ToHexString);
SourceName :=' System\WinDefend';
WinDefendEventLogHandle := OpenEventLog( nil, @SourceName);
Writeln(SourceName, ' : ', WinDefendEventLogHandle.ToHexString);
except
on E: Exception do
Writeln(E.ClassName, ' : ', E. Message);
end;
Readln;
end.
Ausgabe:
Code:
System: 006D7370
System\WinDefend: 006D8480
|
|
Zitat
|