IFilter interface

[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]

Scans documents for text and properties (also called attributes). It extracts chunks of text from these documents, filtering out embedded formatting and retaining information about the position of the text. It also extracts chunks of values, which are properties of an entire document or of well-defined parts of a document. IFilter provides the foundation for building higher-level applications such as document indexers and application-independent viewers.

For introductory information about how the IFilter interface works with documents and document properties, see Properties of Documents. For a synopsis and an example of how the IFilter interface processes a document, see Property Filtering and Property Indexing.

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. For information about constructing an IFilter implementation, see Constructing Filters. For information about registering a dynamic-link library (DLL) to be called by Indexing Service for the associated file class, see Applying Filters. For information about testing your IFilter implementation, see Testing Filters.

When to use

Full-text search engines like Indexing Service 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.

Indexing Service uses three functions to access registered IFilter implementations. These functions are especially useful when loading and binding to an embedded object's IFilter implementation. The functions are: LoadIFilter, BindIFilterFromStorage, and BindIFilterFromStream.


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


The IFilter interface has these methods.


Retrieves an interface representing the specified portion of object. Currently reserved for future use.


Positions filter at beginning of first or next chunk and returns a descriptor.


Retrieves text from the current chunk.


Retrieves values from the current chunk.


Initializes a filtering session.



IFilter components for Indexing Service 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.


Minimum supported client

Windows 2000 Professional (desktop apps only)

Minimum supported server

Windows 2000 Server (desktop apps only)

End of client support

Windows 7

End of server support

Windows Server 2008 R2



See also




Build date: 9/10/2012

Community Additions

© 2015 Microsoft