GetFilter Method

The GetFilter method retrieves appropriate IFilter according to parameters supplied.

Syntax
HRESULT GetFilter(
  CLSID*pclsidObj,
  LPCWSTRpcwszContentType,
  LPCWSTRpcwszExtension,
  IFilter**ppFilter);
Parameters
  • pclsidObj
    [in] Pointer to a CLSID that contains the Class ID of the document type from the registry. This is used for items with embedded documents to indicate the appropriate IFilter to use for that embedded document.
  • pcwszContentType
    [in] Pointer to a LPCWSTR that contains Content Type of the document. This is used to retrieve IFilters that are mapped according to Multipurpose Internet Mail Extensions (MIME) type.
  • pcwszExtension
    [in] Pointer to a LPCWSTR that contains file extension without preceding period. This is used to retrieve Filters that are mapped according to file extension.
  • ppFilter
    [out, retval] Address of a pointer to the IFilter the protocol handler will use.
Return Value

For a list of error messages returned by SharePoint Portal Server protocol handlers, see Error Messages.

Remarks

Only one of the three parameters needs to be provided. If multiple parameters are provided they will be tested in the following order: Content Type, CLSID, File Extension. The first valid parameter will be used to select the appropriate IFilter, and the others will be ignored.