Export (0) Print
Expand All

GetEventLogInformation function

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

hEventLog [in]

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

dwInfoLevel [in]

The level of event log information to return. This parameter can be the following value.

ValueMeaning
EVENTLOG_FULL_INFO

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

 

lpBuffer [out]

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

cbBufSize [in]

The size of the lpBuffer buffer, in bytes.

pcbBytesNeeded [out]

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

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
EVENTLOG_FULL_INFORMATION
OpenEventLog
RegisterEventSource

 

 

Community Additions

ADD
Show:
© 2014 Microsoft