EvtGetQueryInfo function wevtapi

Win32Result<bool> EvtGetQueryInfo(
  1. EVT_HANDLE queryOrSubscription,
  2. EVT_QUERY_PROPERTY_ID propertyId,
  3. int propertyValueBufferSize,
  4. Pointer<EVT_VARIANT>? propertyValueBuffer,
  5. Pointer<Uint32> propertyValueBufferUsed,
)

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.

To learn more, see learn.microsoft.com/windows/win32/api/winevt/nf-winevt-evtgetqueryinfo.

Implementation

Win32Result<bool> EvtGetQueryInfo(
  EVT_HANDLE queryOrSubscription,
  EVT_QUERY_PROPERTY_ID propertyId,
  int propertyValueBufferSize,
  Pointer<EVT_VARIANT>? propertyValueBuffer,
  Pointer<Uint32> propertyValueBufferUsed,
) {
  resolveGetLastError();
  final result_ = _EvtGetQueryInfo(
    queryOrSubscription,
    propertyId,
    propertyValueBufferSize,
    propertyValueBuffer ?? nullptr,
    propertyValueBufferUsed,
  );
  return .new(value: result_ != FALSE, error: GetLastError());
}