Upravit

Sdílet prostřednictvím


EvtGetPublisherMetadataProperty function (winevt.h)

Gets the specified provider metadata property.

Syntax

BOOL EvtGetPublisherMetadataProperty(
  [in]  EVT_HANDLE                         PublisherMetadata,
  [in]  EVT_PUBLISHER_METADATA_PROPERTY_ID PropertyId,
  [in]  DWORD                              Flags,
  [in]  DWORD                              PublisherMetadataPropertyBufferSize,
  [in]  PEVT_VARIANT                       PublisherMetadataPropertyBuffer,
  [out] PDWORD                             PublisherMetadataPropertyBufferUsed
);

Parameters

[in] PublisherMetadata

A handle to the metadata that the EvtOpenPublisherMetadata function returns.

[in] PropertyId

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

[in] Flags

Reserved. Must be zero.

[in] PublisherMetadataPropertyBufferSize

The size of the PublisherMetadataPropertyBuffer buffer, in bytes.

[in] PublisherMetadataPropertyBuffer

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.

[out] PublisherMetadataPropertyBufferUsed

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

Caution  

EvtGetEventMetadataProperty can return many different kinds of values in the EventMetadataPropertyBuffer variable. If EventMetadataPropertyBuffer->Type == EvtVarTypeEvtHandle then EventMetadataPropertyBuffer contains a handle that needs to be freed. When you are done with the handle, call the EvtClose function.

 

Examples

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

Requirements

Requirement Value
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

EvtOpenPublisherMetadata