Share via


Implementing the Filter Class and Class Factory

Note

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.

 

At least two classes, such as CFilter and CFilterCF, are typically implemented by each filter DLL.

The CFilter class produces the filter object that implements the content-filtering functionality. Its member functions implement the interface methods of the filter. Each filter class requires a unique class identifier (CLSID), which the filter implementer generates.

The CFilterCF class produces the class-factory object for the filter. The class factory is called, through its IClassFactory interface, by the DllGetClassObject entry point of the DLL. The CFilterCF class creates the CFilter object and returns a pointer to its IUnknown interface.

In complex cases, a filter can implement a class hierarchy in place of the single CFilter class.

Secure Code Practices