Export (0) Print
Expand All

GetNumberOfEventLogRecords function

Retrieves the number of records in the specified event log.

Syntax


BOOL GetNumberOfEventLogRecords(
  _In_   HANDLE hEventLog,
  _Out_  PDWORD NumberOfRecords
);

Parameters

hEventLog [in]

A handle to the open event log. The OpenEventLog or OpenBackupEventLog function returns this handle.

NumberOfRecords [out]

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

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The oldest record in an event log is not necessarily record number 1. To determine the oldest record number in an event log, use the GetOldestEventLogRecord function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Event Logging Functions
GetOldestEventLogRecord
OpenBackupEventLog
OpenEventLog

 

 

Community Additions

ADD
Show:
© 2014 Microsoft