This topic has not yet been rated - Rate this topic

GetOldestEventLogRecord function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Event Logging Functions
GetNumberOfEventLogRecords
OpenBackupEventLog
OpenEventLog

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ