Export (0) Print
Expand All

EvtGetQueryInfo function

Gets information about a query that you ran that identifies the list of channels or log files that the query attempted to access. The function also gets a list of return codes that indicates the success or failure of each access.

Syntax


BOOL WINAPI EvtGetQueryInfo(
  _In_  EVT_HANDLE            QueryOrSubscription,
  _In_  EVT_QUERY_PROPERTY_ID PropertyId,
  _In_  DWORD                 PropertyValueBufferSize,
  _In_  PEVT_VARIANT          PropertyValueBuffer,
  _Out_ PDWORD                PropertyValueBufferUsed
);

Parameters

QueryOrSubscription [in]

A handle to the query that theEvtQuery or EvtSubscribe function returns.

PropertyId [in]

The identifier of the query information to retrieve. For a list of identifiers, see the EVT_QUERY_PROPERTY_ID enumeration.

PropertyValueBufferSize [in]

The size of the PropertyValueBuffer buffer, in bytes.

PropertyValueBuffer [in]

A caller-allocated buffer that will receive the query information. 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 only need to call this function, if you pass the EvtQueryTolerateQueryErrors flag to EvtQuery or the EvtSubscribeTolerateQueryErrors flag to EvtSubscribe.

Examples

For an example that shows how to use this function, see Querying for Events.

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

EvtQuery
EvtSubscribe

 

 

Community Additions

ADD
Show:
© 2015 Microsoft