Group: Event Logging - Library: advapi32
Reading entries from Event logs
BOOL GetOldestEventLogRecord(
HANDLE hEventLog,
PDWORD OldestRecord
);
DECLARE INTEGER GetOldestEventLogRecord IN advapi32;
INTEGER hEventLog,;
LONG @OldestRecord
hEventLog [in] A handle to the open event log. This handle is returned by the OpenEventLog or OpenBackupEventLog function.
OldestRecord [out] A pointer to a variable that receives the absolute record number of the oldest record in the specified event log.
If the function succeeds, the return value is nonzero.
The oldest record in an event log is not necessarily record number 1.
hLog = OpenEventLog(NULL, "Application")
IF hLog <> 0
STORE 0 TO nReccount, nRecno
= GetNumberOfEventLogRecords(m.hLog, @nReccount)
= GetOldestEventLogRecord(m.hLog, @nRecno)
? nReccount, nRecno
= CloseEventLog(hLog)
ENDIF