RegisterFilterEx Method

The RegisterFilterEx method registers an IFilter for one or more data sources.

Syntax
HRESULT RegisterFilterEx (
ULONGcExtensionsNum,
    WCHAR const *extensions [],
    ULONG cClassIdsNum,
    CLSID const * classIds [],
    ULONGcMimesNum,
    WCHAR const *mimeTypes [],
    WCHAR const *pwcsOverride,
    FILTER_THREADING_MODEL *pThreadingModelOverride,
    CLSID const *pClsid,
    WCHAR const *pwcsProgid,
    BOOL fFirst,
    WCHAR const * pwcsMachineName,
);
Parameters
  • cExtensionsNum
    [in] A ULONG that contains the number of elements in the extensions array parameter.
  • extensions []
    [size_is(cExtensionsNum)] An array of pointers to WCHAR that contain file name extensions.
  • cClassIdsNum
    [in] A ULONG that contains the number of elements in the classIds array parameter.
  • classIds []
    [size_is(cClassIdsNum)] An array of pointers to CLSID that contain Class IDs for file content types.
  • cMimesNum
    [in] A ULONG that contains the number of elements in the mimeTypes array parameter.
  • mimeTypes []
    [size_is(cMimesNum)] An array of pointers to WCHAR that contain MIME types for file content types.
  • pwcsOverride
    [in] A pointer to a WCHAR that contains an override string, such as the application name.
  • pThreadingModelOverride
    [in] A pointer to a FILTER_THREADING_MODEL that contains values that override the threading model of the IFilter.
  • pClsid
    [in] A pointer to a CLSID that contains the Class ID of the IFilter being registered.
  • pwcsProgid
    [in] A pointer to a WCHAR that contains the ProgID of the IFilter being registered.
  • fFirst
    [in] Not used. Value should be 1.
  • pwcsMachineName
    [in] A pointer to a WCHAR that contains the computer on which the mapping is stored.
Return Value

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

Remarks

This method registers the specified IFilter on each of the data source types specified. Each element in the extensions and mimeTypes arrays contains either null or the name of a data source. Each element in the array classIds contains either null or the Class ID of a data source. The parameters cExtensionsNum, cClassIdsNum, and cMimesNum specify how many elements in each array contain valid data sources.

If the pwcsOverride string is not null, the method registers the IFilter as the override filter for the data source types. When the IFilter is loaded with the LoadIFilterFromStorageEx or is searched for with the GetDefaultFilter methods using an override string. If an IFilter is registered with that same override string and for the same data source type, it will be returned instead of the non-overridden IFilter.