TdhEnumerateProviderFilters function (tdh.h)

The TdhEnumerateProviderFilters function enumerates the filters that the specified provider defined in the manifest.


TDHSTATUS TdhEnumerateProviderFilters(
  [in]            LPGUID                Guid,
  [in]            ULONG                 TdhContextCount,
  [in, optional]  PTDH_CONTEXT          TdhContext,
  [in]            ULONG                 *FilterCount,
  [out, optional] PPROVIDER_FILTER_INFO *Buffer,
  [in, out]       ULONG                 *BufferSize


[in] Guid

GUID that identifies the provider whose filters you want to retrieve.

[in] TdhContextCount

Not used.

[in, optional] TdhContext

Not used.

[in] FilterCount

The number of filter structures that the pBuffer buffer contains. Is zero if the pBuffer buffer is insufficient.

[out, optional] Buffer

User-allocated buffer to receive the filter information. For details, see the PROVIDER_FILTER_INFO structure.

[in, out] BufferSize

Size, in bytes, of the pBuffer buffer. If the function succeeds, this parameter receives the size of the buffer used. If the buffer is too small, the function returns ERROR_INSUFFICIENT_BUFFER and sets this parameter to the required buffer size. If the buffer size is zero on input, no data is returned in the buffer and this parameter receives the required buffer size.

Return value

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

Return code Description
The size of the pBuffer buffer is too small. Use the required buffer size set in pBufferSize to allocate a new buffer.
The schema for the event was not found.
One or more of the parameters is not valid.
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.


This function uses the XML manifest to retrieve the information.


Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header tdh.h
Library Tdh.lib
DLL Tdh.dll