mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
256 lines
9.9 KiB
256 lines
9.9 KiB
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<title>IFilter Interface in Index Server</title>
|
|
<meta name="GENERATOR" content="Microsoft FrontPage 1.1">
|
|
</head>
|
|
|
|
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
|
|
<table>
|
|
<tr><td valign=top><img src="idx_logo.gif" align=bottom width=166 height=69> </td><td valign=top><h1><i>IFilter Interface in Index Server</i></h1>
|
|
<p align=center><strong><i>Windows Design Team, September 7, 1996</i></strong> </p>
|
|
</td></tr>
|
|
</table>
|
|
<p>This document describes use of the IFilter interface in Microsoft Index Server.</p>
|
|
<p> </p>
|
|
<hr>
|
|
<h1>Contents</h1>
|
|
<blockquote>
|
|
<p><a href="#Introduction">Introduction</a></p>
|
|
<p><a href="#Persistent Handlers">Persistent Handlers</a></p>
|
|
<p><a href="#Pseudo-Persistent Handler API">Pseudo-Persistent Handler API</a></p>
|
|
<p><a href="#Recommended Properties">Recommended Properties</a></p>
|
|
<blockquote>
|
|
<p><a href="#Title">Title</a></p>
|
|
<p><a href="#Description">Description</a></p>
|
|
<p><a href="#Office Summary Information">Office Summary Information</a></p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<hr>
|
|
<h1><a name="Introduction">Introduction</a></h1>
|
|
<p>This document is an addendum to the IFilter interface specification. It describes additional API and conventions specific to the
|
|
Microsoft Index Server. </p>
|
|
<h1><a name="Persistent Handlers">Persistent Handlers</a></h1>
|
|
<p>Microsoft Index Server assumes implementations of the IFilter interface are registered as <i>persistent handlers</i> 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. </p>
|
|
<p>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. </p>
|
|
<p>Multiple handlers may be defined to provide behavior for a single persistent object. Each <i>interface</i> 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. </p>
|
|
<p>The following registry entries are sufficient to load the implementation of IFilter for objects of type SampleObject. </p>
|
|
<p><tt>\Registry\MACHINE\SOFTWARE\Classes</tt> </p>
|
|
<blockquote>
|
|
<p><tt>.sam</tt> </p>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ SampleFile</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<p><tt>SampleFile</tt> </p>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ Class for Sample Files</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>CLSID</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ {40A45370-0386-11D0-AE19-00AA004B9986}</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<p><tt>CLSID</tt> </p>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>{40A45370-0386-11D0-AE19-00AA004B9986}</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ Sample Files</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>InprocServer32</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ sample.dll</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><b><tt>PersistentHandler</tt></b> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ {A6317C60-0386-11D0-AE19-00AA004B9986}</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>{A6317C60-0386-11D0-AE19-00AA004B9986}</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ Sample file persistent handler</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><b><tt>PersistentAddinsRegistered</tt></b> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>{89BCB740-6119-101A-BCB7-00DD010655AF}</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ
|
|
{D7455400-0386-11D0-AE19-00AA004B9986}</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>{D7455400-0386-11D0-AE19-00AA004B9986}</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ C and C++ filter</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>InprocServer32</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<blockquote>
|
|
<p><tt>= REG_SZ sampfilt.dll</tt> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
<p>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, <b>PersistentHandler</b>. This specifies the class
|
|
responsible for brokering requests to the persistent objects of the sample class. The entry under <b>PersistentAddinsRegistered</b>
|
|
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. </p>
|
|
<h1><a name="Pseudo-Persistent Handler API">Pseudo-Persistent Handler API</a></h1>
|
|
<p>Three API are provided with Microsoft Index Server which are sufficient to instantiate IFilter for use by Microsoft Index Server. These
|
|
API are <b>not</b> a full implementation of OLE persistent handlers. The three API are: </p>
|
|
<p><tt>SCODE LoadIFilter( WCHAR const * pwcsPath, IUnknown * pUnkOuter, void ** ppIUnk );</tt> </p>
|
|
<p><tt>SCODE BindIFilterFromStorage( IStorage * pStg, IUnknown * pUnkOuter, void ** ppIUnk );</tt> </p>
|
|
<p><tt>SCODE BindIFilterFromStream( IStream * pStm, IUnknown * pUnkOuter, void ** ppIUnk );</tt> </p>
|
|
<p>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. </p>
|
|
<p>These API are declared in the file ntquery.h, and exported from query.lib. </p>
|
|
<h1><a name="Recommended Properties">Recommended Properties</a></h1>
|
|
<p>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. </p>
|
|
<p>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. </p>
|
|
<blockquote>
|
|
<h2><a name="Title">Title</a></h2>
|
|
<p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\2 </p>
|
|
<p>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. </p>
|
|
</blockquote>
|
|
<blockquote>
|
|
<h2><a name="Description">Description</a></h2>
|
|
<p>D1B5D3F0-C0B3-11CF-9A92-00A0C908DBF1\”DESCRIPTION” </p>
|
|
<p>The description property is exposed by the HTML filter. <a href="#FOOTNOTE_1">[1]</a> It corresponds to the <tt><META NAME=”DESCRIPTION”
|
|
...></tt> tag. If this property exists, it is used exclusively to generate the document abstract. </p>
|
|
<p><i>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.</i> </p>
|
|
</blockquote>
|
|
<blockquote>
|
|
<h2><a name="Office Summary Information">Office Summary Information</a></h2>
|
|
<p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\2 (title) </p>
|
|
<p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\3 (subject) </p>
|
|
<p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\4 (author) </p>
|
|
<p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\5 (keywords) </p>
|
|
<p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\6 (comments) </p>
|
|
<p>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. </p>
|
|
<p> </p>
|
|
<p> </p>
|
|
<p> </p>
|
|
<p><font size=2>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.<br>
|
|
<br>
|
|
This document is for informational purposes only. <strong>MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS
|
|
DOCUMENT.</strong><br>
|
|
<br>
|
|
© 1996 Microsoft Corporation. All rights reserved.<br>
|
|
<br>
|
|
Microsoft is a registered trademark of Microsoft Corporation. Other product and company names herein may be the trademarks of
|
|
their respective owners.</font></p>
|
|
</blockquote>
|
|
<hr>
|
|
<h4>Footnotes</h4>
|
|
<p><a name="FOOTNOTE_1">[1]</a> Meta descriptions are not emitted by the sample HTML filter. </p>
|
|
</body>
|
|
|
|
</html>
|