Leaked source code of windows server 2003
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.

404 lines
24 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999.
  5. //
  6. // File: dllreg.cxx
  7. //
  8. // Contents: Null and Plain Text filter registration
  9. //
  10. // History: 21-Jan-97 dlee Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #include <pch.cxx>
  14. #pragma hdrstop
  15. #include <filtreg.hxx>
  16. #include <langreg.hxx>
  17. #include <cifrmres.h>
  18. #include <strres.hxx>
  19. StringResource srBinaryFile = { MSG_CLASS_BINARY_FILE };
  20. SClassEntry aTheNullClasses[] =
  21. {
  22. { L".386", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  23. { L".AudioCD", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  24. { L".DeskLink", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  25. { L".Folder", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  26. { L".MAPIMail", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  27. { L".ZFSendToTarget", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  28. { L".aif", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  29. { L".aifc", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  30. { L".aiff", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  31. { L".aps", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  32. { L".asf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  33. { L".au", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  34. { L".avi", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  35. { L".bin", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  36. { L".bkf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  37. { L".bmp", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  38. { L".bsc", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  39. { L".cab", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  40. { L".cda", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  41. { L".cgm", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  42. { L".com", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  43. { L".cpl", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  44. { L".cur", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  45. { L".dbg", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  46. { L".dct", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  47. { L".dib", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  48. { L".dl_", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  49. { L".dll", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  50. { L".drv", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  51. { L".dvd", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  52. { L".emf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  53. { L".eps", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  54. { L".ex_", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  55. { L".exe", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  56. { L".exp", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  57. { L".eyb", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  58. { L".fnd", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  59. { L".fnt", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  60. { L".fon", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  61. { L".ghi", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  62. { L".gif", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  63. { L".gz", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  64. { L".hqx", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  65. { L".icm", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  66. { L".ico", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  67. { L".idb", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  68. { L".ilk", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  69. { L".imc", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  70. { L".in_", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  71. { L".inv", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  72. { L".ivf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  73. { L".jbf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  74. { L".jfif", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  75. { L".jpe", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  76. { L".jpeg", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  77. { L".jpg", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  78. { L".latex", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  79. { L".lib", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  80. { L".m14", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  81. { L".m1v", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  82. { L".mdb", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  83. { L".mid", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  84. { L".midi", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  85. { L".mmf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  86. { L".mov", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  87. { L".movie", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  88. { L".mp2", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  89. { L".mp2v", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  90. { L".mp3", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  91. { L".mpa", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  92. { L".mpe", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  93. { L".mpeg", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  94. { L".mpg", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  95. { L".mpv2", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  96. { L".msg", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  97. { L".mv", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  98. { L".mydocs", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  99. { L".ncb", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  100. { L".obj", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  101. { L".oc_", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  102. { L".ocx", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  103. { L".pch", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  104. { L".pdb", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  105. { L".pds", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  106. { L".pic", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  107. { L".pma", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  108. { L".pmc", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  109. { L".pml", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  110. { L".pmr", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  111. { L".png", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  112. { L".psd", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  113. { L".res", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  114. { L".rle", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  115. { L".rmi", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  116. { L".rpc", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  117. { L".rsp", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  118. { L".sbr", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  119. { L".sc2", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  120. { L".sit", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  121. { L".snd", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  122. { L".sr_", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  123. { L".sy_", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  124. { L".sym", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  125. { L".sys", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  126. { L".tar", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  127. { L".tgz", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  128. { L".tif", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  129. { L".tiff", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  130. { L".tlb", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  131. { L".tsp", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  132. { L".ttc", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  133. { L".ttf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  134. { L".vbx", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  135. { L".vxd", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  136. { L".wav", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  137. { L".wax", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  138. { L".wll", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  139. { L".wlt", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  140. { L".wm", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  141. { L".wma", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  142. { L".wmf", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  143. { L".wmp", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  144. { L".wmv", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  145. { L".wmx", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  146. { L".wmz", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  147. { L".wsz", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  148. { L".wvx", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  149. { L".xbm", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  150. { L".xix", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  151. { L".z", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  152. { L".z96", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  153. { L".zip", L"BinaryFile", L"Binary file", L"{08c524e0-89b0-11cf-88a1-00aa004b9986}", L"Binary file" },
  154. };
  155. SHandlerEntry const TheNullHandler =
  156. {
  157. L"{098f2470-bae0-11cd-b579-08002b30bfeb}",
  158. L"Null persistent handler",
  159. L"{c3278e90-bea7-11cd-b579-08002b30bfeb}"
  160. };
  161. SFilterEntry const TheNullFilter =
  162. {
  163. L"{c3278e90-bea7-11cd-b579-08002b30bfeb}",
  164. L"Null filter",
  165. L"query.dll",
  166. L"Both"
  167. };
  168. DEFINE_SOFT_REGISTERFILTER( TheNull,
  169. TheNullHandler,
  170. TheNullFilter,
  171. aTheNullClasses )
  172. StringResource srAsciiFile = { MSG_CLASS_ASCII_FILE };
  173. StringResource srBatFile = { MSG_CLASS_BAT_FILE };
  174. StringResource srCmdFile = { MSG_CLASS_CMD_FILE };
  175. StringResource srIdqFile = { MSG_CLASS_IDQ_FILE };
  176. StringResource srIniFile = { MSG_CLASS_INI_FILE };
  177. StringResource srInxFile = { MSG_CLASS_INX_FILE };
  178. StringResource srRegFile = { MSG_CLASS_REG_FILE };
  179. StringResource srInfFile = { MSG_CLASS_INF_FILE };
  180. StringResource srVbsFile = { MSG_CLASS_VBS_FILE };
  181. SClassEntry aPlainTextClasses[] =
  182. {
  183. // .dic files are marked as txtfiles by Office install
  184. { L".dic", L"PlainText", L"Plain ASCII/UniCode text file", L"{89bcb7a4-6119-101a-bcb7-00dd010655af}", L"Plain ASCII/UniCode text file" },
  185. { L".txt", L"PlainText", L"Plain ASCII/UniCode text file", L"{89bcb7a4-6119-101a-bcb7-00dd010655af}", L"Plain ASCII/UniCode text file" },
  186. { L".wtx", L"PlainText", L"Plain ASCII/UniCode text file", L"{89bcb7a4-6119-101a-bcb7-00dd010655af}", L"Plain ASCII/UniCode text file" },
  187. { L".bat", L"batfile", L"MS-DOS Batch File", L"{89bcb7a5-6119-101a-bcb7-00dd010655af}", L"MS-DOS Batch File" },
  188. { L".cmd", L"cmdfile", L"Windows Command Script", L"{89bcb7a6-6119-101a-bcb7-00dd010655af}", L"Windows Command Script" },
  189. { L".idq", L"idqfile", L"Microsoft Query parameter file", L"{961c1130-89ad-11cf-88a1-00aa004b9986}", L"Microsoft Query parameter file" },
  190. { L".ini", L"inifile", L"Configuration Settings", L"{8c9e8e1c-90f0-11d1-ba0f-00a0c906b239}", L"Configuration Settings" },
  191. { L".inx", L"inxfile", L"Setup Settings", L"{95876eb0-90f0-11d1-ba0f-00a0c906b239}", L"Setup Settings" },
  192. { L".reg", L"regfile", L"Registration Entries", L"{9e704f44-90f0-11d1-ba0f-00a0c906b239}", L"Registration Entries" },
  193. { L".inf", L"inffile", L"Setup Information", L"{9ed4692c-90f0-11d1-ba0f-00a0c906b239}", L"Setup Information" },
  194. { L".vbs", L"VBSFile", L"VBScript Script File", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"VBScript Script File" },
  195. // new entries from the Shell group
  196. { L".asm", L"asmfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  197. { L".asx", L"playlist", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  198. { L".c", L"cfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  199. { L".cpp", L"cppfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  200. { L".cxx", L"cxxfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  201. { L".def", L"deffile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  202. { L".h", L"hfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  203. { L".hpp", L"hppfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  204. { L".hxx", L"hxxfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  205. { L".idl", L"idlfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  206. // insecure, so removed { L".inc", L"incfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  207. { L".js", L"jsfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  208. { L".log", L"logfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  209. { L".m3u", L"playlist", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  210. // insecure, so removed { L".pl", L"plfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  211. { L".rc", L"rcfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  212. { L".rtf", L"rtffile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  213. { L".url", L"urlfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  214. { L".xml", L"xmlfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  215. { L".xsl", L"xlsfile", L"", L"{87db1ada-aa39-11d1-829f-00a0c906b239}", L"" },
  216. };
  217. SHandlerEntry const PlainTextHandler =
  218. {
  219. L"{5e941d80-bf96-11cd-b579-08002b30bfeb}",
  220. L"Plain Text persistent handler",
  221. L"{c1243ca0-bf96-11cd-b579-08002b30bfeb}"
  222. };
  223. SFilterEntry const PlainTextFilter =
  224. {
  225. L"{c1243ca0-bf96-11cd-b579-08002b30bfeb}",
  226. L"Plain Text filter",
  227. L"query.dll",
  228. L"Both"
  229. };
  230. DEFINE_SOFT_REGISTERFILTER( PlainText,
  231. PlainTextHandler,
  232. PlainTextFilter,
  233. aPlainTextClasses )
  234. //
  235. // Extra entries for CI Framework. They happen to have the same form as the
  236. // filter entries.
  237. //
  238. SLangRegistry const NeutralWordBreaker = {
  239. L"Neutral",
  240. 0,
  241. { L"{369647e0-17b0-11ce-9950-00aa004bbb1f}",
  242. L"Neutral Word Breaker",
  243. L"query.dll",
  244. L"Both" },
  245. { 0, 0, 0, 0 }
  246. };
  247. SFilterEntry const NullStemmer_CHS =
  248. {
  249. L"{78fe669a-186e-4108-96e9-77b586c1332f}",
  250. L"Content Index Null Stemmer",
  251. L"query.dll",
  252. L"Both"
  253. };
  254. SFilterEntry const NullStemmer_CHT =
  255. {
  256. L"{78fe669a-186e-4108-96e9-77b586c1332f}",
  257. L"Content Index Null Stemmer",
  258. L"query.dll",
  259. L"Both"
  260. };
  261. SFilterEntry const FrameworkControl =
  262. {
  263. L"{1E9685E6-DB6D-11d0-BB63-00C04FC2F410}",
  264. L"Content Index Framework Control Object",
  265. L"query.dll",
  266. L"Both"
  267. };
  268. SFilterEntry const ISearchCreator =
  269. {
  270. L"{1F247DC0-902E-11D0-A80C-00A0C906241A}",
  271. L"Content Index ISearch Creator Object",
  272. L"query.dll",
  273. L"Both"
  274. };
  275. extern HANDLE g_hCurrentDll;
  276. extern "C" STDAPI CifrmwrkDllRegisterServer(void)
  277. {
  278. CDynLoadUser32 dlUser32;
  279. HINSTANCE hInst = (HINSTANCE) g_hCurrentDll;
  280. //
  281. // Try to load string resources.
  282. //
  283. srBinaryFile.Init( hInst, dlUser32 );
  284. srAsciiFile.Init( hInst, dlUser32 );
  285. srBatFile.Init( hInst, dlUser32 );
  286. srCmdFile.Init( hInst, dlUser32 );
  287. srIdqFile.Init( hInst, dlUser32 );
  288. srIniFile.Init( hInst, dlUser32 );
  289. srInxFile.Init( hInst, dlUser32 );
  290. srRegFile.Init( hInst, dlUser32 );
  291. srInfFile.Init( hInst, dlUser32 );
  292. srVbsFile.Init( hInst, dlUser32 );
  293. //
  294. // Adjust static definitions
  295. //
  296. for ( unsigned i = 0; i < sizeof(aTheNullClasses)/sizeof(aTheNullClasses[0]); i++ )
  297. {
  298. aTheNullClasses[i].pwszDescription = aTheNullClasses[i].pwszClassIdDescription = STRINGRESOURCE(srBinaryFile);
  299. }
  300. aPlainTextClasses[0].pwszDescription = aPlainTextClasses[0].pwszClassIdDescription = STRINGRESOURCE(srAsciiFile);
  301. aPlainTextClasses[1].pwszDescription = aPlainTextClasses[1].pwszClassIdDescription = STRINGRESOURCE(srAsciiFile);
  302. aPlainTextClasses[2].pwszDescription = aPlainTextClasses[2].pwszClassIdDescription = STRINGRESOURCE(srAsciiFile);
  303. aPlainTextClasses[3].pwszDescription = aPlainTextClasses[3].pwszClassIdDescription = STRINGRESOURCE(srBatFile);
  304. aPlainTextClasses[4].pwszDescription = aPlainTextClasses[4].pwszClassIdDescription = STRINGRESOURCE(srCmdFile);
  305. aPlainTextClasses[5].pwszDescription = aPlainTextClasses[5].pwszClassIdDescription = STRINGRESOURCE(srIdqFile);
  306. aPlainTextClasses[6].pwszDescription = aPlainTextClasses[6].pwszClassIdDescription = STRINGRESOURCE(srIniFile);
  307. aPlainTextClasses[7].pwszDescription = aPlainTextClasses[7].pwszClassIdDescription = STRINGRESOURCE(srInxFile);
  308. aPlainTextClasses[8].pwszDescription = aPlainTextClasses[8].pwszClassIdDescription = STRINGRESOURCE(srRegFile);
  309. aPlainTextClasses[9].pwszDescription = aPlainTextClasses[9].pwszClassIdDescription = STRINGRESOURCE(srInfFile);
  310. aPlainTextClasses[10].pwszDescription = aPlainTextClasses[10].pwszClassIdDescription = STRINGRESOURCE(srVbsFile);
  311. //
  312. // Register classes
  313. //
  314. long dwErr = ERROR_SUCCESS;
  315. SCODE sc = TheNullRegisterServer();
  316. if ( S_OK == sc )
  317. sc = PlainTextRegisterServer();
  318. if ( S_OK == sc )
  319. dwErr = RegisterALanguageResource( NeutralWordBreaker );
  320. if ( S_OK == sc && ERROR_SUCCESS == dwErr )
  321. dwErr = RegisterAFilter( NullStemmer_CHS );
  322. if ( S_OK == sc && ERROR_SUCCESS == dwErr )
  323. dwErr = RegisterAFilter( NullStemmer_CHT );
  324. if ( S_OK == sc && ERROR_SUCCESS == dwErr )
  325. dwErr = RegisterAFilter( FrameworkControl );
  326. if ( S_OK == sc && ERROR_SUCCESS == dwErr )
  327. dwErr = RegisterAFilter( ISearchCreator );
  328. return S_OK != sc ? sc :
  329. (ERROR_SUCCESS == dwErr ? S_OK : SELFREG_E_CLASS );
  330. } //CifrmwrkDllRegisterServer
  331. extern "C" STDAPI CifrmwrkDllUnregisterServer(void)
  332. {
  333. SCODE sc = TheNullUnregisterServer();
  334. SCODE sc2 = PlainTextUnregisterServer();
  335. long dw3 = UnRegisterALanguageResource( NeutralWordBreaker );
  336. long dw4 = UnRegisterAFilter( NullStemmer_CHS );
  337. long dw5 = UnRegisterAFilter( NullStemmer_CHT );
  338. long dw6 = UnRegisterAFilter( FrameworkControl );
  339. long dw7 = UnRegisterAFilter( ISearchCreator );
  340. if ( FAILED( sc ) )
  341. return sc;
  342. if ( FAILED( sc2 ) )
  343. return sc2;
  344. if ( ERROR_SUCCESS != dw3 )
  345. return S_FALSE;
  346. if ( ERROR_SUCCESS != dw4 )
  347. return S_FALSE;
  348. if ( ERROR_SUCCESS != dw5 )
  349. return S_FALSE;
  350. if ( ERROR_SUCCESS != dw6 )
  351. return S_FALSE;
  352. if ( ERROR_SUCCESS != dw7 )
  353. return S_FALSE;
  354. return S_OK;
  355. } //CifrmwrkDllUnregisterServer