EvtGetObjectArrayProperty function

Gets a provider metadata property from the specified object in the array.

Syntax

BOOL EvtGetObjectArrayProperty(
  EVT_OBJECT_ARRAY_PROPERTY_HANDLE ObjectArray,
  DWORD                            PropertyId,
  DWORD                            ArrayIndex,
  DWORD                            Flags,
  DWORD                            PropertyValueBufferSize,
  PEVT_VARIANT                     PropertyValueBuffer,
  PDWORD                           PropertyValueBufferUsed
);

Parameters

ObjectArray

A handle to an array of objects that the EvtGetPublisherMetadataProperty function returns.

PropertyId

The property identifier of the metadata property that you want to get from the specified object. For possible values, see the Remarks section of EVT_PUBLISHER_METADATA_PROPERTY_ID.

ArrayIndex

The zero-based index of the object in the array.

Flags

Reserved. Must be zero.

PropertyValueBufferSize

The size of the PropertyValueBuffer buffer, in bytes.

PropertyValueBuffer

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

PropertyValueBufferUsed

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/value Description
TRUE
The function succeeded.
FALSE
The function failed. To get the error code, call the GetLastError function.

Remarks

When you call the EvtGetPublisherMetadataProperty function with the following IDs, the function returns a handle to an array of objects of that type:

  • EvtPublisherMetadataChannelReferences
  • EvtPublisherMetadataLevels
  • EvtPublisherMetadataTasks
  • EvtPublisherMetadataOpcodes
  • EvtPublisherMetadataKeywords
For example, if you pass EvtPublisherMetadataKeywords to EvtGetPublisherMetadataProperty, the function returns a handle to an array of keyword objects.

To determine the size of the array, call the EvtGetObjectArraySize function.

Examples

For an example that shows how to use this function, see Getting a Provider's Metadata.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header winevt.h
Library Wevtapi.lib
DLL Wevtapi.dll

See Also

EVT_PUBLISHER_METADATA_PROPERTY_ID

EvtGetPublisherMetadataProperty