Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The RegisterFilter method of the IFilterRegistration interface registers an IFilter for one or more data sources.
Parameters
cExtensionsNum [in] A pointer to a ULONG that contains the number of elements in the extensions array parameter.
extensions [] [size_is(cExtensionsNum)] A pointer to an array of pointers to WCHAR that contain file name extensions for which the IFilter is to be registered.
cClassIdsNum [in] A ULONG that contains the number of elements in the classIds array parameter.
classIds [] [size_is(cClassIdsNum)] An array of pointers to CLSIDs for which the IFilter is to be registered.
cMimesNum [in] A pointer to ULONG that contains the number of elements in the mimeTypes array parameter.
mimeTypes [size_is(cMimesNum)] An array of pointers to WCHAR that contain Multipurpose Internet Mail Extensions (MIME) types for which the IFilter is to be registered.
pwcsOverride [in] A pointer to WCHAR that contains an override string, such as the application name.
pClsid [in] A pointer to CLSID that contains the class ID of the IFilter being registered.
pwcsProgid [in] A pointer to WCHAR that contains the program ID (ProgID) of the IFilter being registered.
fFirst [in] Not used. Value should be 1.
pwcsMachineName [in] Not used. Value should be 0.
Exceptions
For a list of errors returned by Microsoft SharePoint Portal Server Search IFilter registration objects, see IFilter Administration Error Messages.
Remarks
The RegisterFilter 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 fFirst Boolean is true, the IFilter is registered as the highest-precedence filter for each data source type. If the fFirst Boolean is false, the IFilter is added at the end of the list of IFilters registered for each data source type.
If the pwcsOverride string, which is the portal site ID, is not null, the method registers the IFilter as being the override filter for the data source types. This means that the IFilter is registered only for a specified portal site. When the IFilter is loaded with the LoadIFilterFromStorageEx method or is searched for with the GetDefaultFilter method using an override string, the IFilter that is not overridden may not be returned. If an IFilter is registered with that same override string and for the same data source type, it will be returned instead.
Requirements
Platform: Microsoft Windows Server 2003