GetEventLogInformation function (winbase.h)

Retrieves information about the specified event log.

Syntax

BOOL GetEventLogInformation(
  [in]  HANDLE  hEventLog,
  [in]  DWORD   dwInfoLevel,
  [out] LPVOID  lpBuffer,
  [in]  DWORD   cbBufSize,
  [out] LPDWORD pcbBytesNeeded
);

Parameters

[in] hEventLog

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

[in] dwInfoLevel

The level of event log information to return.

This parameter can be the following value.

Value Meaning
EVENTLOG_FULL_INFO
Indicate whether the specified log is full. The lpBuffer parameter will contain an EVENTLOG_FULL_INFORMATION structure.

[out] lpBuffer

An application-allocated buffer that receives the event log information. The format of this data depends on the value of the dwInfoLevel parameter.

[in] cbBufSize

The size of the lpBuffer buffer, in bytes.

[out] pcbBytesNeeded

The function sets this parameter to the required buffer size for the requested information, regardless of whether the function succeeds. Use this value if the function fails with ERROR_INSUFFICIENT_BUFFER to allocate a buffer of the correct size.

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.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Advapi32.lib
DLL Advapi32.dll

See also

EVENTLOG_FULL_INFORMATION

Event Logging Functions

OpenEventLog

RegisterEventSource