GetNumberOfEventLogRecords

  BOOL GetNumberOfEventLogRecords(hEventLog, pcRecords)    
  HANDLE hEventLog; /* open event-log handle */
  PDWORD pcRecords; /* buffer for number of records */

The GetNumberOfEventLogRecords function retrieves the number of records in the specified event log.

Parameters

hEventLog

Specifies an open event-log handle (a handle returned by the OpenEventLog or OpenBackupEventLog function).

pcRecords

Points to a variable that receives the number of records in the specified event log.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

See Also

GetOldestEventLogRecord