IFilter Interface

The IFilter interface 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.

IFilter Members

BindRegion Retrieves an interface representing the specified portion of the object. Currently reserved for future use.
GetChunk 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, and returns a description of the current chunk.
GetText Retrieves text (text-type properties) from the current chunk, which must have a CHUNKSTATE enumeration value of CHUNK_TEXT.
GetValue Retrieves a value (internal value-type property) from a chunk, which must have a CHUNKSTATE enumeration value of CHUNK_VALUE.
Init Initializes a filtering session.

Remarks

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 DLL to be called by Windows Search 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 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.

Windows Search 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.

Interface Information

Inherits from IUnknown
Header filter.h
Import library User-Defined
Minimum operating systems Windows NT 4.0 with the Windows NT 4.0 Option Pack, Windows 2000