TdhDeletePayloadFilter function (tdh.h)

The TdhDeletePayloadFilter function frees the memory allocated for a single payload filter by the TdhCreatePayloadFilter function.

Syntax

TDHSTATUS TdhDeletePayloadFilter(
  [in, out] PVOID *PayloadFilter
);

Parameters

[in, out] PayloadFilter

A pointer to a single payload filter allocated by the TdhCreatePayloadFilter function.

Return value

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

Return code Description
ERROR_INVALID_PARAMETER
One or more of the parameters is not valid.

Remarks

On Windows 8.1,Windows Server 2012 R2, and later, event payload filters can be used by the EnableTraceEx2 function to filter on the specific content of the event in a logger session.

The TdhDeletePayloadFilter function is used to free memory allocated for a single payload filter that is returned by the TdhCreatePayloadFilter function.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header tdh.h
Library Tdh.lib
DLL Tdh.dll

See also

ENABLE_TRACE_PARAMETERS

EVENT_FILTER_DESCRIPTOR

EnableTraceEx2

TdhAggregatePayloadFilters

TdhCleanupPayloadEventFilterDescriptor

TdhCreatePayloadFilter