LoadIFilter Method
The LoadIFilter method retrieves the best-suited IFilter for the specified data source.
Syntax
HRESULT LoadIFilter(
WCHAR const *pwcsPath,
FILTERED_DATA_SOURCES*pFilteredSources,
IUnknown *pUnkOuter,
BOOLfUseDefault,
CLSID *pFilterClsid,
Int *SearchDecSize,
WCHAR **pwcsSearchDesc,
IFilter**ppIFilt);
Parameters
- pwcsPath
[in] A pointer to a WCHAR that contains the Path or Universal Resource Indicator (URI) for the file to be filtered. Can be null if the user does not want IPersist*::Load to be called. - pFilteredSources
[in] A pointer to a FILTERED_DATA_SOURCES from which to retrieve information. - pUnkOuter
[in] A pointer to the outer IUnknown for the calling object. - fUseDefault
[in] A BOOL that specifies that the default filter should be used if a more suitable filter is not found. - pFilterClsid
[out] A pointer to a CLSID that receives the class ID of the returned filter. - 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 to the IFilter interface of the filter chosen by the method. The value is null if none is found.
Return Value
For a list of errors returned by SharePoint Portal Server IFilter administration objects, see Error Messages.
Remarks
This method attempts to load an IFilter that can process the data source of the type specified in the pFilteredSources parameter. The filter is located at pwcsPath.
If no suitable IFilter is found for the data source, and fUseDefault is false, this method returns null in the ppIFilt parameter. If no suitable IFilter is found for the data source, and fUseDefault is true, the IFilter interface on the default IFilter is returned in the ppIFilt parameter.
The IFilter must be released after it is used.