IFilter and Protocol Handler Information
Overview
Windows Search, including search in Windows Vista, natively indexes more than 200 of the most common file types, which are listed on the Searchable File Types page. However, software developers will continue to create new file types and proprietary data stores to meet the needs of their users, and the contents of these file types and data stores should be included in the index. To enable the system index to scan these file types and data stores, developers can write IFilters or Protocol Handlers, which are add-ins for Windows Search. Once a specific IFilter or Protocol Handler is installed, the end user can readily search those file formats or data stores.
Prior to creating an add-in for a file type or data store that is not natively supported by Windows Search, you may be able to download one that was created by a third party developer. To find out if one is available, review the available add-ins for Windows Search. If you don't see it on our add-in pages, you can also search the Web to see if one was created by another company.
If you are a software developer and are looking for guidance on writing your own IFilters and Protocol Handlers, please see the MSDN documentation for Adding Data to the Index.
IFilter considerations
IFilters for the different versions of Windows Search, while very similar to each other, are not compatible across all versions of the indexer. IFilters and Protocol Handlers are shell extensions and must be written in native code due to potential CLR versioning issues with the process in which multiple add-ins run.
When developing a custom IFilter, the IPersistStream interface should be used to ensure maximum compatibility across all Windows Search versions. The IPersistStorage and IPersistFile are other interfaces used in IFilters, but do not provide the same level of compatibility across Windows Vista and the different versions of Windows Search as the IPersistStream interface. The following rules may help you understand the differences between the IPersist interfaces.
IPersistStream—mandatory for Windows Vista, Windows Search 4.0, and WDS 3.01
IPersistStorage (optional)—can be embedded in another document via OLE Document embedding
IPersistFile (legacy, optional)—If you already have an IFilter which implements this, it doesn't hurt anything and may work better with old indexers such as Windows 2000 indexing service.
Protocol Handler considerations
For Protocol Handlers, the ISearchProtocol interface is used regardless of the version of Windows Search; this interface can be implemented as either system level or user-mode. To ensure maximum compatibility you should utilize the system level. Following is a brief description of the two methods by which a protocol handler may be implemented.
System level protocol handlers—these work on all platforms
User-mode protocol handlers (optional)—your protocol handler should use the user context by building the USER-SID into the URL, and it should work on all versions of Windows Search (but not SharePoint or any other Microsoft indexer which doesn't support user-mode indexing)
To learn more about developing add-ins for Windows Vista, visit the Windows Vista Developer's Center and read The Windows Vista Developer Story: Search and Organize.