Export (0) Print
Expand All

EvtGetLogInfo function

Gets information about a channel or log file.

Syntax


BOOL WINAPI EvtGetLogInfo(
  _In_   EVT_HANDLE Log,
  _In_   EVT_LOG_PROPERTY_ID PropertyId,
  _In_   DWORD PropertyValueBufferSize,
  _In_   PEVT_VARIANT PropertyValueBuffer,
  _Out_  PDWORD PropertyValueBufferUsed
);

Parameters

Log [in]

A handle to the channel or log file that the EvtOpenLog function returns.

PropertyId [in]

The identifier of the property to retrieve. For a list of property identifiers, see the EVT_LOG_PROPERTY_ID enumeration.

PropertyValueBufferSize [in]

The size of the PropertyValueBuffer buffer, in bytes.

PropertyValueBuffer [in]

A caller-allocated buffer that will receive the property value. The buffer contains an EVT_VARIANT object. You can set this parameter to NULL to determine the required buffer size.

PropertyValueBufferUsed [out]

The size, in bytes, of the caller-allocated buffer that the function used or the required buffer size if the function fails with ERROR_INSUFFICIENT_BUFFER.

Return value

Return code/valueDescription
TRUE

The function succeeded.

FALSE

The function failed. To get the error code, call the GetLastError function.

 

Remarks

You can get complete information for Operational and Admin channels or .evtx files; however, for Debug and Analytic channels or .etl files, you cannot get information for the EvtLogFull, EvtLogOldestRecordNumber, and EvtLogNumberOfLogRecords properties.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinEvt.h

Library

Wevtapi.lib

DLL

Wevtapi.dll

See also

EvtOpenLog

 

 

Community Additions

ADD
Show:
© 2014 Microsoft