Group: Event Logging - Library: advapi32
Reading entries from Event logs
Writing entries to custom Event Log
BOOL GetNumberOfEventLogRecords(
HANDLE hEventLog,
PDWORD NumberOfRecords
);
DECLARE INTEGER GetNumberOfEventLogRecords IN advapi32;
INTEGER hEventLog,;
LONG @NumberOfRecords
hEventLog [in] A handle to the open event log. This handle is returned by the OpenEventLog or OpenBackupEventLog function.
NumberOfRecords [out] A pointer to a variable that receives the number of records in the specified event log.
If the function succeeds, the return value is nonzero.
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