|Microsoft DirectX 9.0|
The RegisterFilter method adds filter information to the registry.
HRESULT RegisterFilter( REFCLSID clsidFilter, LPCWSTR Name, IMoniker **ppMoniker, const CLSID *pclsidCategory, const OLECHAR *szInstance, const REGFILTER2 *prf2 );
[in] Class identifier (CLSID) of the filter.
[in] Descriptive name for the filter.
[in, out] Address of a pointer to a device moniker that determines where this filter's data will be written. Can be NULL.
[in] Pointer to the filter category of the filter. If NULL, the default category is CLSID_ActiveMovieFilters. (See Filter Categories.)
[in] Instance data for constructing the device moniker's display name. Can be the friendly name, or the string representation of the filter CLSID. If NULL, defaults to the filter CLSID.
[in] Pointer to a REGFILTER2 structure containing filter information.
Returns an HRESULT value. Possible values include those shown in the following table.
|VFW_E_BAD_KEY||Could not get registry key.|
This method adds information about the filter to the registry, under the registry entry for the specified filter category. It does not register the in-process server that creates the filter (usually a DLL). To register the server, you can call the AMovieDllRegisterServer2 function.
For the ppMoniker parameter, use one of the following:
If you are registering a filter for a Windows Driver Model (WDM) or Plug and Play device, pass the address of the existing device moniker. The filter will be registered using this moniker. When the method returns, *ppMoniker is set to NULL.
Otherwise, the method creates a new moniker. If ppMoniker is non-NULL, the method sets *ppMoniker to point to the new moniker. The application can use this moniker to write additional private values in the property bag. Be sure to release the interface.
Set ppMoniker to NULL if you don't want to provide or receive the moniker.