Skip to content

Latest commit

 

History

History
156 lines (122 loc) · 5.21 KB

nf-tdh-tdhgetpropertysize.md

File metadata and controls

156 lines (122 loc) · 5.21 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:tdh.TdhGetPropertySize
TdhGetPropertySize function (tdh.h)
Retrieves the size of one or more property values in the event data.
TdhGetPropertySize
TdhGetPropertySize function [ETW]
etw.tdhgetpropertysize_func
tdh.tdhgetpropertysize_func
tdh/TdhGetPropertySize
etw\tdhgetpropertysize_func.htm
ETW
52b034db-b08b-4c79-973f-33800ca866f5
12/05/2018
TdhGetPropertySize, TdhGetPropertySize function [ETW], etw.tdhgetpropertysize_func, tdh.tdhgetpropertysize_func, tdh/TdhGetPropertySize
tdh.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Tdh.lib
Tdh.dll
Windows
19H1
TdhGetPropertySize
tdh/TdhGetPropertySize
c++
APIRef
kbSyntax
DllExport
Tdh.dll
API-MS-Win-Eventing-Tdh-L1-1-0.dll
MinTdh.dll
TdhGetPropertySize

TdhGetPropertySize function

-description

Retrieves the size of one or more property values in the event data.

-parameters

-param pEvent [in]

The event record passed to your EventRecordCallback callback. For details, see the EVENT_RECORD structure.

-param TdhContextCount [in]

Number of elements in pTdhContext.

-param pTdhContext [in]

Array of context values for WPP or classic ETW events only, otherwise, NULL. For details, see the TDH_CONTEXT structure. The array must not contain duplicate context types.

-param PropertyDataCount [in]

Number of data descriptor structures in pPropertyData.

-param pPropertyData [in]

Array of PROPERTY_DATA_DESCRIPTOR structures that define the property whose size you want to retrieve.

You can pass this same array to the TdhGetProperty function to retrieve the property data.

If you are retrieving the size of a property that is not a member of a structure, you can specify a single data descriptor. If you are retrieving the size of a property that is a member of a structure, specify an array of two data descriptors (structures cannot contain or reference other structures). For more information on specifying this parameter, see the example code below.

-param pPropertySize [out]

Size of the property, in bytes. Use this value to allocate the buffer passed in the pBuffer parameter of the TdhGetProperty function.

-returns

Returns ERROR_SUCCESS if successful. Otherwise, this function returns one of the following return codes in addition to others.

Return code Description
ERROR_NOT_FOUND
The schema for the event was not found or the specified map was not found.

If you used a MOF class to define your event, TDH looks for the schema in the WMI repository. If you used a manifest to define your event, TDH looks in the provider's resources. If you use a manifest, the resourceFileName attribute of the provider element defines the location where TDH expects to find the resources.

ERROR_INVALID_PARAMETER
One or more of the parameters is not valid.
ERROR_FILE_NOT_FOUND
The resourceFileName attribute in the manifest contains the location of the provider binary. When you register the manifest, the location is written to the registry. TDH was unable to find the binary based on the registered location.
ERROR_WMI_SERVER_UNAVAILABLE
The WMI service is not available.

-remarks

If the event is a WPP or classic ETW event, you can specify context information that is used to help parse the event information. The event is a WPP event if the EVENT_HEADER_FLAG_TRACE_MESSAGE flag is set in the Flags member of EVENT_HEADER (see the EventHeader member of EVENT_RECORD). The event is a legacy ETW event if the EVENT_HEADER_FLAG_CLASSIC_HEADER flag is set.

Examples

For an example that shows how to call this function, see Using TdhGetProperty to Consume Event Data.

-see-also

TdhGetProperty