LoadIFilterEx Method

The LoadIFilterEx method retrieves the best-suited IFilter for the specified data source.

Syntax
HRESULT LoadIFilterEx(
  WCHAR const * pwcsPath,
  FILTERED_DATA_SOURCE *pFilteredSource,
  IUnknown * pUnkOuter,
  BOOL fUseDefault,
  CLSID *pFilterClsid,
  Int * SearchDecSize,
  WCHAR ** pwcsSearchDesc,
  IFilter ** ppIFilt);
Parameters
  • pwcsPath
    [in] A pointer to a WCHAR that contains a Path or Universal Resource Indicator (URI) of the file to be filtered. Can also be 0 if IPersist*::Load should not be called on the file/stream/storage.
  • pFilteredSource
    [in] A pointer to a FILTERED_DATA_SOURCE from which to retrieve information. Cannot be 0.
  • pUnkOuter
    [in] A pointer to the outer IUnknown for the filter object.
  • fUseDefault
    [in] A BOOL that specifies the default filter should be used if a more suitable one is not found.
  • pFilterClsid
    [out] A pointer to a CLSID that receives the filter Class ID of the returned filter. Cannot be 0.
  • SearchDecSize
    [in, out] Not used. Value should be 0.
  • pwcsSearchDesc
    [out, size_is(*SearchDecSize)] Not used. Value should be 0.
  • ppIFilt
    [out] An address of a pointer that receives the pointer to the IFilter requested. The value is null if no filter is found.
Return Value

For a list of errors returned by SharePoint Portal Server IFilter registration objects, see Error Messages.

Remarks

This method attempts to load an IFilter that can process the data source of the type specified in the pFilteredSource parameter, located at pwcsPath.

If no suitable IFilter is found for the data source, and fUseDefault is false, this method returns null in ppIFilt parameter. If fUseDefault is true and no suitable IFilter is found for the data source, the IFilter interface on the default IFilter is returned in ppIFilt.

The IFilter must be released after it is used.