Source code of Windows XP (NT5)
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

  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2. <html>
  3. <head>
  4. <title>IFilter Interface in Index Server</title>
  5. <meta name="GENERATOR" content="Microsoft FrontPage 1.1">
  6. </head>
  7. <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
  8. <table>
  9. <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>
  10. <p align=center><strong><i>Windows Design Team, September 7, 1996</i></strong> </p>
  11. </td></tr>
  12. </table>
  13. <p>This document describes use of the IFilter interface in Microsoft Index Server.</p>
  14. <p>&#160;</p>
  15. <hr>
  16. <h1>Contents</h1>
  17. <blockquote>
  18. <p><a href="#Introduction">Introduction</a></p>
  19. <p><a href="#Persistent Handlers">Persistent Handlers</a></p>
  20. <p><a href="#Pseudo-Persistent Handler API">Pseudo-Persistent Handler API</a></p>
  21. <p><a href="#Recommended Properties">Recommended Properties</a></p>
  22. <blockquote>
  23. <p><a href="#Title">Title</a></p>
  24. <p><a href="#Description">Description</a></p>
  25. <p><a href="#Office Summary Information">Office Summary Information</a></p>
  26. </blockquote>
  27. </blockquote>
  28. <hr>
  29. <h1><a name="Introduction">Introduction</a></h1>
  30. <p>This document is an addendum to the IFilter interface specification. It describes additional API and conventions specific to the
  31. Microsoft Index Server. </p>
  32. <h1><a name="Persistent Handlers">Persistent Handlers</a></h1>
  33. <p>Microsoft Index Server assumes implementations of the IFilter interface are registered as <i>persistent handlers</i> for OLE classes. The
  34. specifics of the persistent handler mechanism may change in future releases of Windows/NT or Index Server, but the API described
  35. below will continue to be supported. </p>
  36. <p>A persistent handler provides the same service for the persistent image of an object that the OLE running object table provides for the
  37. loaded, in-memory image. The persistent handler is the broker between the persistent state of an object and clients wishing to access
  38. that state. It is responsible for coordinating multiple client access to the persistent state of an object. </p>
  39. <p>Multiple handlers may be defined to provide behavior for a single persistent object. Each <i>interface</i> may specify a unique handler for
  40. only that interface. Potentially, multiple handlers which are ignorant of each other may all operate on the persistent image of the same
  41. object. It is the responsibility of the persistent handler to load the correct implementation for each interface. </p>
  42. <p>The following registry entries are sufficient to load the implementation of IFilter for objects of type SampleObject. </p>
  43. <p><tt>\Registry\MACHINE\SOFTWARE\Classes</tt> </p>
  44. <blockquote>
  45. <p><tt>.sam</tt> </p>
  46. </blockquote>
  47. <blockquote>
  48. <blockquote>
  49. <p><tt>= REG_SZ SampleFile</tt> </p>
  50. </blockquote>
  51. </blockquote>
  52. <blockquote>
  53. <p><tt>SampleFile</tt> </p>
  54. </blockquote>
  55. <blockquote>
  56. <blockquote>
  57. <p><tt>= REG_SZ Class for Sample Files</tt> </p>
  58. </blockquote>
  59. </blockquote>
  60. <blockquote>
  61. <blockquote>
  62. <p><tt>CLSID</tt> </p>
  63. </blockquote>
  64. </blockquote>
  65. <blockquote>
  66. <blockquote>
  67. <blockquote>
  68. <p><tt>= REG_SZ {40A45370-0386-11D0-AE19-00AA004B9986}</tt> </p>
  69. </blockquote>
  70. </blockquote>
  71. </blockquote>
  72. <blockquote>
  73. <p><tt>CLSID</tt> </p>
  74. </blockquote>
  75. <blockquote>
  76. <blockquote>
  77. <p><tt>{40A45370-0386-11D0-AE19-00AA004B9986}</tt> </p>
  78. </blockquote>
  79. </blockquote>
  80. <blockquote>
  81. <blockquote>
  82. <blockquote>
  83. <p><tt>= REG_SZ Sample Files</tt> </p>
  84. </blockquote>
  85. </blockquote>
  86. </blockquote>
  87. <blockquote>
  88. <blockquote>
  89. <blockquote>
  90. <p><tt>InprocServer32</tt> </p>
  91. </blockquote>
  92. </blockquote>
  93. </blockquote>
  94. <blockquote>
  95. <blockquote>
  96. <blockquote>
  97. <blockquote>
  98. <p><tt>= REG_SZ sample.dll</tt> </p>
  99. </blockquote>
  100. </blockquote>
  101. </blockquote>
  102. </blockquote>
  103. <blockquote>
  104. <blockquote>
  105. <blockquote>
  106. <p><b><tt>PersistentHandler</tt></b> </p>
  107. </blockquote>
  108. </blockquote>
  109. </blockquote>
  110. <blockquote>
  111. <blockquote>
  112. <blockquote>
  113. <blockquote>
  114. <p><tt>= REG_SZ {A6317C60-0386-11D0-AE19-00AA004B9986}</tt> </p>
  115. </blockquote>
  116. </blockquote>
  117. </blockquote>
  118. </blockquote>
  119. <blockquote>
  120. <blockquote>
  121. <p><tt>{A6317C60-0386-11D0-AE19-00AA004B9986}</tt> </p>
  122. </blockquote>
  123. </blockquote>
  124. <blockquote>
  125. <blockquote>
  126. <blockquote>
  127. <p><tt>= REG_SZ Sample file persistent handler</tt> </p>
  128. </blockquote>
  129. </blockquote>
  130. </blockquote>
  131. <blockquote>
  132. <blockquote>
  133. <blockquote>
  134. <p><b><tt>PersistentAddinsRegistered</tt></b> </p>
  135. </blockquote>
  136. </blockquote>
  137. </blockquote>
  138. <blockquote>
  139. <blockquote>
  140. <blockquote>
  141. <blockquote>
  142. <p><tt>{89BCB740-6119-101A-BCB7-00DD010655AF}</tt> </p>
  143. </blockquote>
  144. </blockquote>
  145. </blockquote>
  146. </blockquote>
  147. <blockquote>
  148. <blockquote>
  149. <blockquote>
  150. <blockquote>
  151. <blockquote>
  152. <p><tt>= REG_SZ
  153. {D7455400-0386-11D0-AE19-00AA004B9986}</tt> </p>
  154. </blockquote>
  155. </blockquote>
  156. </blockquote>
  157. </blockquote>
  158. </blockquote>
  159. <blockquote>
  160. <blockquote>
  161. <p><tt>{D7455400-0386-11D0-AE19-00AA004B9986}</tt> </p>
  162. </blockquote>
  163. </blockquote>
  164. <blockquote>
  165. <blockquote>
  166. <blockquote>
  167. <p><tt>= REG_SZ C and C++ filter</tt> </p>
  168. </blockquote>
  169. </blockquote>
  170. </blockquote>
  171. <blockquote>
  172. <blockquote>
  173. <blockquote>
  174. <p><tt>InprocServer32</tt> </p>
  175. </blockquote>
  176. </blockquote>
  177. </blockquote>
  178. <blockquote>
  179. <blockquote>
  180. <blockquote>
  181. <blockquote>
  182. <p><tt>= REG_SZ sampfilt.dll</tt> </p>
  183. </blockquote>
  184. </blockquote>
  185. </blockquote>
  186. </blockquote>
  187. <p>Up through the entry for the class (CLSID\40A45370-0386-11D0-AE19-00AA004B9986) this is standard OLE. The DLL
  188. sample.dll implements running object behavior for the .sam class. But note the extra entry, <b>PersistentHandler</b>. This specifies the class
  189. responsible for brokering requests to the persistent objects of the sample class. The entry under <b>PersistentAddinsRegistered</b>
  190. identifies the implementation responsible for the interface named 89BCB740-6119-101A-BCB7-00DD010655AF (IID_IFilter).
  191. Finally, we come to the class implementing IID_IFilter and again, the syntax is standard OLE. The InprocServer32 is loaded through
  192. the standard OLE mechanism. </p>
  193. <h1><a name="Pseudo-Persistent Handler API">Pseudo-Persistent Handler API</a></h1>
  194. <p>Three API are provided with Microsoft Index Server which are sufficient to instantiate IFilter for use by Microsoft Index Server. These
  195. API are <b>not</b> a full implementation of OLE persistent handlers. The three API are: </p>
  196. <p><tt>SCODE LoadIFilter( WCHAR const * pwcsPath, IUnknown * pUnkOuter, void ** ppIUnk );</tt> </p>
  197. <p><tt>SCODE BindIFilterFromStorage( IStorage * pStg, IUnknown * pUnkOuter, void ** ppIUnk );</tt> </p>
  198. <p><tt>SCODE BindIFilterFromStream( IStream * pStm, IUnknown * pUnkOuter, void ** ppIUnk );</tt> </p>
  199. <p>Each will take an object or object name (as a path, IStorage, and IStream respectively) plus an optional controlling unknown and
  200. return an interface pointer bound to the IFilter interface. The latter two API are especially useful when binding to the filter of an
  201. embedded object. </p>
  202. <p>These API are declared in the file ntquery.h, and exported from query.lib. </p>
  203. <h1><a name="Recommended Properties">Recommended Properties</a></h1>
  204. <p>The IFilter interface does not require any particular property be exposed, but Index Server will take advantage of the existence of
  205. some properties. Filter writers are encouraged to expose the following properties. Exposing the same properties from multiple object
  206. formats allows the client of Index Server to make a common query across many (or all) types of object. </p>
  207. <p>The properties below are named by the format identifier of the property set, followed by either a number corresponding to the
  208. PROPID of the PROPSPEC for properties of type PRSPEC_PROPID or a string corresponding to the string name for properties of
  209. type PRSPEC_LPWSTR. </p>
  210. <blockquote>
  211. <h2><a name="Title">Title</a></h2>
  212. <p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\2 </p>
  213. <p>The title property is the title property from the Microsoft&#174; Office summary information property set. By default, this
  214. property is cached by the index server for quick retrieval. The HTML filter also exposes the title property. </p>
  215. </blockquote>
  216. <blockquote>
  217. <h2><a name="Description">Description</a></h2>
  218. <p>D1B5D3F0-C0B3-11CF-9A92-00A0C908DBF1\&#148;DESCRIPTION&#148; </p>
  219. <p>The description property is exposed by the HTML filter. <a href="#FOOTNOTE_1">[1]</a> It corresponds to the <tt>&lt;META NAME=&#148;DESCRIPTION&#148;
  220. ...&gt;</tt> tag. If this property exists, it is used exclusively to generate the document abstract. </p>
  221. <p><i>Note that other properties of type PRSPEC_LPWSTR in the same property set as the description property
  222. correspond to other HTML meta tags with the equivalent name.</i> </p>
  223. </blockquote>
  224. <blockquote>
  225. <h2><a name="Office Summary Information">Office Summary Information</a></h2>
  226. <p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\2 (title) </p>
  227. <p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\3 (subject) </p>
  228. <p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\4 (author) </p>
  229. <p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\5 (keywords) </p>
  230. <p>F29F85E0-4FF9-1068-AB91-08002B27B3D9\6 (comments) </p>
  231. <p>In addition to title, several other properties from the Microsoft&#174; Office summary information property set may be
  232. useful. Their use is listed above after the PROPID. </p>
  233. <p>&#160;</p>
  234. <p>&#160;</p>
  235. <p>&#160;</p>
  236. <p><font size=2>The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the
  237. date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment
  238. on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.<br>
  239. <br>
  240. This document is for informational purposes only. <strong>MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS
  241. DOCUMENT.</strong><br>
  242. <br>
  243. &#169; 1996 Microsoft Corporation. All rights reserved.<br>
  244. <br>
  245. Microsoft is a registered trademark of Microsoft Corporation. Other product and company names herein may be the trademarks of
  246. their respective owners.</font></p>
  247. </blockquote>
  248. <hr>
  249. <h4>Footnotes</h4>
  250. <p><a name="FOOTNOTE_1">[1]</a> Meta descriptions are not emitted by the sample HTML filter. </p>
  251. </body>
  252. </html>