The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IFilter interface

Scans items for text and properties. Methods of this interface extract chunks of text from items, filtering out embedded formatting and retaining information about the position of the text. The methods also extract chunks of values that are properties of an entire item or of well-defined parts of the item. IFilter provides the foundation for building higher-level applications such as document indexers and application-independent viewers.

Important  In Windows 7 and later, filters written in managed code are explicitly blocked. Filters MUST be written in native code due to potential CLR versioning issues with the process that multiple add-ins run in.


The IFilter interface inherits from the IUnknown interface. IFilter also has these types of members:


The IFilter interface has these methods.


This method is reserved for future use.


Retrieves a description of the current chunk and positions the filter at the beginning of the next chunk, or at the first chunk if this is the first call to the GetChunk method.


Retrieves text (text-type properties) from the current chunk, which must have a CHUNKSTATE enumeration value of CHUNK_TEXT.


Retrieves a value (internal value-type property) from a chunk, which must have a CHUNKSTATE enumeration value of CHUNK_VALUE.


Initializes a filtering session.



IFilter components for Windows Search run in the Local Security context and should be written to manage buffers and to stack correctly. All string copies must have explicit checks to guard against buffer overruns. You should always verify the allocated size of the buffer and test the size of the data against the size of the buffer.

When to Implement

Implement this interface if you are providing a filter to extract information from a proprietary file format so that the text and properties can be included in the index. Full-text search engines like Windows Search call the methods of this interface to extract text and property information for creating an index. Text viewers can also use this interface after a query, for example, to show the hit highlights for that file.

The IFilterSample code sample, available on Code Gallery and the Windows 7 SDK, demonstrates how to create an IFilter base class for implementing the IFilter interface.

For conceptual information about IFilter implementation, see Developing Filter Handlers. For information about IFilters and property handlers, see "Full-Text Support" and "Operating System Implementation Considerations" in Developing Property Handlers for Windows Search.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]


Windows NT 4.0 Option Pack



See also

The Indexing Process