Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

GetOldestEventLogRecord function

Retrieves the absolute record number of the oldest record in the specified event log.

Syntax


BOOL GetOldestEventLogRecord(
  _In_  HANDLE hEventLog,
  _Out_ PDWORD OldestRecord
);

Parameters

hEventLog [in]

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

OldestRecord [out]

A pointer to a variable that receives the absolute record number of the oldest record 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. For more information, see Event Log Records.

Examples

For an example, see Querying for Event Information.

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
GetNumberOfEventLogRecords
OpenBackupEventLog
OpenEventLog

 

 

Community Additions

ADD
Show:
© 2015 Microsoft