IAMFilterData::CreateFilterData method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note

This interface has been deprecated. New applications should not use it.

 

The CreateFilterData method creates binary registry data for a filter. This data can be written to the registry as a REG_BINARY subkey named FilterData, under the filter's CLSID key.

There is typically no reason for an application to call this method. The IFilterMapper2::RegisterFilter method automatically creates the binary data and adds it to the correct location in the registry. For more information, see How to Register DirectShow Filters.

Syntax

HRESULT CreateFilterData(
  [in]  REGFILTER2 *prf2,
  [out] BYTE       **prgbFilterData,
  [out] ULONG      *pcb
);

Parameters

prf2 [in]

Pointer to a REGFILTER2 structure that contains the filter information.

prgbFilterData [out]

Address of a variable that receives a pointer to the binary data. The method allocates the memory for the data. The caller must release the memory by calling the CoTaskMemFree method.

pcb [out]

Pointer to a variable that receives the size of the binary data, in bytes.

Return value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

Note

The header Fil_data.h is located in the Mapper Sample directory in the Windows SDK.

 

Requirements

Requirement Value
Header
Fil_data.h
DLL
Quartz.dll

See also

IAMFilterData Interface