IFilter Interface in Index Server

Windows Design Team, September 7, 1996

This document describes use of the IFilter interface in Microsoft Index Server.

 


Contents

Introduction

Persistent Handlers

Pseudo-Persistent Handler API

Recommended Properties

Title

Description

Office Summary Information


Introduction

This document is an addendum to the IFilter interface specification. It describes additional API and conventions specific to the Microsoft Index Server.

Persistent Handlers

Microsoft Index Server assumes implementations of the IFilter interface are registered as persistent handlers for OLE classes. The specifics of the persistent handler mechanism may change in future releases of Windows/NT or Index Server, but the API described below will continue to be supported.

A persistent handler provides the same service for the persistent image of an object that the OLE running object table provides for the loaded, in-memory image. The persistent handler is the broker between the persistent state of an object and clients wishing to access that state. It is responsible for coordinating multiple client access to the persistent state of an object.

Multiple handlers may be defined to provide behavior for a single persistent object. Each interface may specify a unique handler for only that interface. Potentially, multiple handlers which are ignorant of each other may all operate on the persistent image of the same object. It is the responsibility of the persistent handler to load the correct implementation for each interface.

The following registry entries are sufficient to load the implementation of IFilter for objects of type SampleObject.

\Registry\MACHINE\SOFTWARE\Classes

.sam

= REG_SZ SampleFile

SampleFile

= REG_SZ Class for Sample Files

CLSID

= REG_SZ {40A45370-0386-11D0-AE19-00AA004B9986}

CLSID

{40A45370-0386-11D0-AE19-00AA004B9986}

= REG_SZ Sample Files

InprocServer32

= REG_SZ sample.dll

PersistentHandler

= REG_SZ {A6317C60-0386-11D0-AE19-00AA004B9986}

{A6317C60-0386-11D0-AE19-00AA004B9986}

= REG_SZ Sample file persistent handler

PersistentAddinsRegistered

{89BCB740-6119-101A-BCB7-00DD010655AF}

= REG_SZ {D7455400-0386-11D0-AE19-00AA004B9986}

{D7455400-0386-11D0-AE19-00AA004B9986}

= REG_SZ C and C++ filter

InprocServer32

= REG_SZ sampfilt.dll

Up through the entry for the class (CLSID\40A45370-0386-11D0-AE19-00AA004B9986) this is standard OLE. The DLL sample.dll implements running object behavior for the .sam class. But note the extra entry, PersistentHandler. This specifies the class responsible for brokering requests to the persistent objects of the sample class. The entry under PersistentAddinsRegistered identifies the implementation responsible for the interface named 89BCB740-6119-101A-BCB7-00DD010655AF (IID_IFilter). Finally, we come to the class implementing IID_IFilter and again, the syntax is standard OLE. The InprocServer32 is loaded through the standard OLE mechanism.

Pseudo-Persistent Handler API

Three API are provided with Microsoft Index Server which are sufficient to instantiate IFilter for use by Microsoft Index Server. These API are not a full implementation of OLE persistent handlers. The three API are:

SCODE LoadIFilter( WCHAR const * pwcsPath, IUnknown * pUnkOuter, void ** ppIUnk );

SCODE BindIFilterFromStorage( IStorage * pStg, IUnknown * pUnkOuter, void ** ppIUnk );

SCODE BindIFilterFromStream( IStream * pStm, IUnknown * pUnkOuter, void ** ppIUnk );

Each will take an object or object name (as a path, IStorage, and IStream respectively) plus an optional controlling unknown and return an interface pointer bound to the IFilter interface. The latter two API are especially useful when binding to the filter of an embedded object.

These API are declared in the file ntquery.h, and exported from query.lib.

Recommended Properties

The IFilter interface does not require any particular property be exposed, but Index Server will take advantage of the existence of some properties. Filter writers are encouraged to expose the following properties. Exposing the same properties from multiple object formats allows the client of Index Server to make a common query across many (or all) types of object.

The properties below are named by the format identifier of the property set, followed by either a number corresponding to the PROPID of the PROPSPEC for properties of type PRSPEC_PROPID or a string corresponding to the string name for properties of type PRSPEC_LPWSTR.

Title

F29F85E0-4FF9-1068-AB91-08002B27B3D9\2

The title property is the title property from the Microsoft® Office summary information property set. By default, this property is cached by the index server for quick retrieval. The HTML filter also exposes the title property.

Description

D1B5D3F0-C0B3-11CF-9A92-00A0C908DBF1\”DESCRIPTION”

The description property is exposed by the HTML filter. [1] It corresponds to the <META NAME=”DESCRIPTION” ...> tag. If this property exists, it is used exclusively to generate the document abstract.

Note that other properties of type PRSPEC_LPWSTR in the same property set as the description property correspond to other HTML meta tags with the equivalent name.

Office Summary Information

F29F85E0-4FF9-1068-AB91-08002B27B3D9\2 (title)

F29F85E0-4FF9-1068-AB91-08002B27B3D9\3 (subject)

F29F85E0-4FF9-1068-AB91-08002B27B3D9\4 (author)

F29F85E0-4FF9-1068-AB91-08002B27B3D9\5 (keywords)

F29F85E0-4FF9-1068-AB91-08002B27B3D9\6 (comments)

In addition to title, several other properties from the Microsoft® Office summary information property set may be useful. Their use is listed above after the PROPID.

 

 

 

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

© 1996 Microsoft Corporation. All rights reserved.

Microsoft is a registered trademark of Microsoft Corporation. Other product and company names herein may be the trademarks of their respective owners.


Footnotes

[1] Meta descriptions are not emitted by the sample HTML filter.