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.

288 lines
11 KiB

  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2. <html xmlns:v="urn:schemas-microsoft-com:vml"
  3. xmlns:o="urn:schemas-microsoft-com:office:office"
  4. xmlns:w="urn:schemas-microsoft-com:office:word"
  5. xmlns="http://www.w3.org/TR/REC-html40">
  6. <head>
  7. <meta http-equiv=Content-Type content="text/html; charset=us-ascii">
  8. <meta name=ProgId content=Word.Document>
  9. <meta name=Generator content="Microsoft Word 10">
  10. <meta name=Originator content="Microsoft Word 10">
  11. <link rel=File-List href="extend_files/filelist.xml">
  12. <title>extend</title>
  13. <!--[if gte mso 9]><xml>
  14. <o:DocumentProperties>
  15. <o:Author>Dave Parsons</o:Author>
  16. <o:Template>Normal</o:Template>
  17. <o:LastAuthor>davidshi</o:LastAuthor>
  18. <o:Revision>5</o:Revision>
  19. <o:TotalTime>358</o:TotalTime>
  20. <o:Created>1999-11-18T21:52:00Z</o:Created>
  21. <o:LastSaved>2001-03-28T00:03:00Z</o:LastSaved>
  22. <o:Pages>1</o:Pages>
  23. <o:Words>351</o:Words>
  24. <o:Characters>2001</o:Characters>
  25. <o:Company>Microsoft Corp.</o:Company>
  26. <o:Lines>16</o:Lines>
  27. <o:Paragraphs>4</o:Paragraphs>
  28. <o:CharactersWithSpaces>2348</o:CharactersWithSpaces>
  29. <o:Version>10.2625</o:Version>
  30. </o:DocumentProperties>
  31. </xml><![endif]--><!--[if gte mso 9]><xml>
  32. <w:WordDocument>
  33. <w:HideSpellingErrors/>
  34. <w:HideGrammaticalErrors/>
  35. <w:Compatibility>
  36. <w:UseFELayout/>
  37. </w:Compatibility>
  38. <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
  39. </w:WordDocument>
  40. </xml><![endif]-->
  41. <style>
  42. <!--
  43. /* Font Definitions */
  44. @font-face
  45. {font-family:SimSun;
  46. panose-1:2 1 6 0 3 1 1 1 1 1;
  47. mso-font-alt:\5B8B\4F53;
  48. mso-font-charset:134;
  49. mso-generic-font-family:auto;
  50. mso-font-pitch:variable;
  51. mso-font-signature:3 135135232 16 0 262145 0;}
  52. @font-face
  53. {font-family:"\@SimSun";
  54. panose-1:2 1 6 0 3 1 1 1 1 1;
  55. mso-font-charset:134;
  56. mso-generic-font-family:auto;
  57. mso-font-pitch:variable;
  58. mso-font-signature:3 135135232 16 0 262145 0;}
  59. /* Style Definitions */
  60. p.MsoNormal, li.MsoNormal, div.MsoNormal
  61. {mso-style-parent:"";
  62. margin:0in;
  63. margin-bottom:.0001pt;
  64. mso-pagination:widow-orphan;
  65. font-size:12.0pt;
  66. font-family:"Times New Roman";
  67. mso-fareast-font-family:"Times New Roman";
  68. color:black;}
  69. h1
  70. {mso-margin-top-alt:auto;
  71. margin-right:0in;
  72. mso-margin-bottom-alt:auto;
  73. margin-left:0in;
  74. mso-pagination:widow-orphan;
  75. mso-outline-level:1;
  76. font-size:24.0pt;
  77. font-family:"Times New Roman";
  78. mso-fareast-font-family:SimSun;
  79. color:black;
  80. font-weight:bold;}
  81. h2
  82. {mso-margin-top-alt:auto;
  83. margin-right:0in;
  84. mso-margin-bottom-alt:auto;
  85. margin-left:0in;
  86. mso-pagination:widow-orphan;
  87. mso-outline-level:2;
  88. font-size:18.0pt;
  89. font-family:"Times New Roman";
  90. mso-fareast-font-family:SimSun;
  91. color:black;
  92. font-weight:bold;}
  93. h3
  94. {mso-margin-top-alt:auto;
  95. margin-right:0in;
  96. mso-margin-bottom-alt:auto;
  97. margin-left:0in;
  98. mso-pagination:widow-orphan;
  99. mso-outline-level:3;
  100. font-size:13.5pt;
  101. font-family:"Times New Roman";
  102. mso-fareast-font-family:SimSun;
  103. color:black;
  104. font-weight:bold;}
  105. a:link, span.MsoHyperlink
  106. {color:blue;
  107. text-decoration:underline;
  108. text-underline:single;}
  109. a:visited, span.MsoHyperlinkFollowed
  110. {color:blue;
  111. text-decoration:underline;
  112. text-underline:single;}
  113. p
  114. {mso-margin-top-alt:auto;
  115. margin-right:0in;
  116. mso-margin-bottom-alt:auto;
  117. margin-left:0in;
  118. mso-pagination:widow-orphan;
  119. font-size:12.0pt;
  120. font-family:"Times New Roman";
  121. mso-fareast-font-family:"Times New Roman";
  122. color:black;}
  123. pre
  124. {margin:0in;
  125. margin-bottom:.0001pt;
  126. mso-pagination:widow-orphan;
  127. tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
  128. font-size:10.0pt;
  129. font-family:"Courier New";
  130. mso-fareast-font-family:"Courier New";
  131. color:black;}
  132. @page Section1
  133. {size:8.5in 11.0in;
  134. margin:1.0in 1.25in 1.0in 1.25in;
  135. mso-header-margin:.5in;
  136. mso-footer-margin:.5in;
  137. mso-paper-source:0;}
  138. div.Section1
  139. {page:Section1;}
  140. /* List Definitions */
  141. @list l0
  142. {mso-list-id:371000526;
  143. mso-list-type:hybrid;
  144. mso-list-template-ids:619977120 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
  145. @list l0:level1
  146. {mso-level-tab-stop:.5in;
  147. mso-level-number-position:left;
  148. text-indent:-.25in;}
  149. @list l0:level2
  150. {mso-level-tab-stop:1.0in;
  151. mso-level-number-position:left;
  152. text-indent:-.25in;}
  153. @list l0:level3
  154. {mso-level-tab-stop:1.5in;
  155. mso-level-number-position:left;
  156. text-indent:-.25in;}
  157. @list l0:level4
  158. {mso-level-tab-stop:2.0in;
  159. mso-level-number-position:left;
  160. text-indent:-.25in;}
  161. @list l0:level5
  162. {mso-level-tab-stop:2.5in;
  163. mso-level-number-position:left;
  164. text-indent:-.25in;}
  165. @list l0:level6
  166. {mso-level-tab-stop:3.0in;
  167. mso-level-number-position:left;
  168. text-indent:-.25in;}
  169. @list l0:level7
  170. {mso-level-tab-stop:3.5in;
  171. mso-level-number-position:left;
  172. text-indent:-.25in;}
  173. @list l0:level8
  174. {mso-level-tab-stop:4.0in;
  175. mso-level-number-position:left;
  176. text-indent:-.25in;}
  177. @list l0:level9
  178. {mso-level-tab-stop:4.5in;
  179. mso-level-number-position:left;
  180. text-indent:-.25in;}
  181. ol
  182. {margin-bottom:0in;}
  183. ul
  184. {margin-bottom:0in;}
  185. -->
  186. </style>
  187. <!--[if gte mso 10]>
  188. <style>
  189. /* Style Definitions */
  190. table.MsoNormalTable
  191. {mso-style-name:"Table Normal";
  192. mso-tstyle-rowband-size:0;
  193. mso-tstyle-colband-size:0;
  194. mso-style-noshow:yes;
  195. mso-style-parent:"";
  196. mso-padding-alt:0in 5.4pt 0in 5.4pt;
  197. mso-para-margin:0in;
  198. mso-para-margin-bottom:.0001pt;
  199. mso-pagination:widow-orphan;
  200. font-size:10.0pt;
  201. font-family:"Times New Roman";}
  202. </style>
  203. <![endif]--><!--[if gte mso 9]><xml>
  204. <o:shapedefaults v:ext="edit" spidmax="3074"/>
  205. </xml><![endif]--><!--[if gte mso 9]><xml>
  206. <o:shapelayout v:ext="edit">
  207. <o:idmap v:ext="edit" data="1"/>
  208. </o:shapelayout></xml><![endif]-->
  209. </head>
  210. <body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:.5in'
  211. leftmargin=8>
  212. <div class=Section1>
  213. <h1><a name=MYSAMPLE>Sample </a>User Interface Extension</h1>
  214. <h1><span style='font-size:14.0pt;mso-bidi-font-size:24.0pt;color:red'>[This is
  215. preliminary documentation and subject to change.]<o:p></o:p></span></h1>
  216. <h2>SUMMARY</h2>
  217. <p>This sample shows how to write Windows Image Acquisition (WIA) user
  218. interface (UI) extensions. It adds tabs to the device properties dialog
  219. (accessible from Explorer) and it adds commands to the context menu for the
  220. sample camera device&#8217;s icon. These extensions are applied to the WIA
  221. sample camera from this DDK by providing implementations of IShellPropSheetExt
  222. and IContextMenu.</p>
  223. <p>This sample will not work on Windows 98 or Windows 2000.</p>
  224. <h3>BUILDING THE SAMPLE</h3>
  225. <p>To build the sample follow these steps:</p>
  226. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
  227. tab-stops:list .5in'><![if !supportLists]><span style='mso-list:Ignore'>1.<span
  228. style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>In
  229. the Start menu, select<span style='mso-spacerun:yes'>&nbsp; </span>&quot;Free
  230. Build Environment&quot; or &quot;Checked Build Environment&quot; under
  231. &quot;Windows DDK&quot; to open a command window and set basic environment
  232. variables needed to build drivers. </p>
  233. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
  234. tab-stops:list .5in'><![if !supportLists]><span style='mso-list:Ignore'>2.<span
  235. style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>Change
  236. to the directory containing the sample driver source code,
  237. src\wdm\wia\extend.</p>
  238. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
  239. tab-stops:list .5in'><![if !supportLists]><span style='mso-list:Ignore'>3.<span
  240. style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>Execute
  241. the &quot;build&quot; command. After the build completes, a library named
  242. Extend.dll will be located in a subdirectory.</p>
  243. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
  244. tab-stops:list .5in'><![if !supportLists]><span style='mso-list:Ignore'>4.<span
  245. style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>Also
  246. build the sample camera driver located in the src\wdm\wia\wiacam
  247. directory.</p>
  248. <h3>USING THE SAMPLE<o:p></o:p></h3>
  249. <p><! ---------------- Snip Snip ---------------- >To use the driver, follow
  250. the instructions in the sample camera readme file, <a
  251. href="../wiacam/wiacam.htm">wiacam.htm</a>.</p>
  252. <p>To test the sample UI extensions, open the Scanners and Cameras folder in
  253. Explorer.</p>
  254. <h3>RESOURCES</h3>
  255. <p>WIA information: <a href="http://www.microsoft.com/hwdev/tech/wia">http://www.microsoft.com/hwdev/tech/wia</a></p>
  256. <p>DDK information: <a href="http://www.microsoft.com/ddk/">http://www.microsoft.com/ddk/</a></p>
  257. <h3>CODE TOUR</h3>
  258. <h3>File Manifest</h3>
  259. <pre>Files<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Description</pre><pre>------------ -------------------------------------------------------</pre><pre>classes.h<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>Defines interface for extensions</pre><pre>extend.cpp<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Implements UI extensions</pre><pre>extend.def<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Linker command file</pre><pre>extend.h<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Header file for UI extensions</pre><pre>extend.rc<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>Resources for UI extensions</pre><pre>makefile<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Used for building the UI extensions&#8212;do not modify</pre><pre>precomp.h<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>Precompiled header file containing all included headers</pre><pre>resource.h<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Header file for resources</pre><pre>shellext.cpp Implements IcontextMenu and IShellPropSheetExt</pre><pre>sources<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Controls building of UI extensions</pre><pre>stdafx.cpp<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Includes standard header files</pre><pre>wiacamui.rgs Registry entries for UI extensions</pre><pre>extend.htm<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>This readme file</pre><pre>extidl.idl<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>MIDL interface definition file</pre><pre>readme.htm<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Project readme file</pre><pre>tcamprop.h<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Header file for private device properties</pre><pre>testdev.ico<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Sample device icon</pre>
  260. </div>
  261. </body>
  262. </html>