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.

255 lines
10 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 9">
  10. <meta name=Originator content="Microsoft Word 9">
  11. <link rel=File-List href="./testmcro_files/filelist.xml">
  12. <title>Testmcro</title>
  13. <!--[if gte mso 9]><xml>
  14. <o:DocumentProperties>
  15. <o:Author>Dave Parsons</o:Author>
  16. <o:LastAuthor>Dave Parsons</o:LastAuthor>
  17. <o:Revision>3</o:Revision>
  18. <o:TotalTime>340</o:TotalTime>
  19. <o:Created>1999-11-18T21:58:00Z</o:Created>
  20. <o:LastSaved>2000-02-02T23:23:00Z</o:LastSaved>
  21. <o:Pages>2</o:Pages>
  22. <o:Words>477</o:Words>
  23. <o:Characters>2720</o:Characters>
  24. <o:Company>Microsoft Corp.</o:Company>
  25. <o:Lines>22</o:Lines>
  26. <o:Paragraphs>5</o:Paragraphs>
  27. <o:CharactersWithSpaces>3340</o:CharactersWithSpaces>
  28. <o:Version>9.2720</o:Version>
  29. </o:DocumentProperties>
  30. </xml><![endif]--><!--[if gte mso 9]><xml>
  31. <w:WordDocument>
  32. <w:HideSpellingErrors/>
  33. <w:HideGrammaticalErrors/>
  34. </w:WordDocument>
  35. </xml><![endif]-->
  36. <style>
  37. <!--
  38. /* Style Definitions */
  39. p.MsoNormal, li.MsoNormal, div.MsoNormal
  40. {mso-style-parent:"";
  41. margin:0in;
  42. margin-bottom:.0001pt;
  43. mso-pagination:widow-orphan;
  44. font-size:12.0pt;
  45. font-family:"Times New Roman";
  46. mso-fareast-font-family:"Times New Roman";
  47. color:black;}
  48. h1
  49. {margin-right:0in;
  50. mso-margin-top-alt:auto;
  51. mso-margin-bottom-alt:auto;
  52. margin-left:0in;
  53. mso-pagination:widow-orphan;
  54. mso-outline-level:1;
  55. font-size:24.0pt;
  56. font-family:"Times New Roman";
  57. color:black;
  58. mso-font-kerning:18.0pt;
  59. font-weight:bold;}
  60. h2
  61. {margin-right:0in;
  62. mso-margin-top-alt:auto;
  63. mso-margin-bottom-alt:auto;
  64. margin-left:0in;
  65. mso-pagination:widow-orphan;
  66. mso-outline-level:2;
  67. font-size:18.0pt;
  68. font-family:"Times New Roman";
  69. color:black;
  70. font-weight:bold;}
  71. h3
  72. {margin-right:0in;
  73. mso-margin-top-alt:auto;
  74. mso-margin-bottom-alt:auto;
  75. margin-left:0in;
  76. mso-pagination:widow-orphan;
  77. mso-outline-level:3;
  78. font-size:13.5pt;
  79. font-family:"Times New Roman";
  80. color:black;
  81. font-weight:bold;}
  82. a:link, span.MsoHyperlink
  83. {color:blue;
  84. text-decoration:underline;
  85. text-underline:single;}
  86. a:visited, span.MsoHyperlinkFollowed
  87. {color:blue;
  88. text-decoration:underline;
  89. text-underline:single;}
  90. p
  91. {margin-right:0in;
  92. mso-margin-top-alt:auto;
  93. mso-margin-bottom-alt:auto;
  94. margin-left:0in;
  95. mso-pagination:widow-orphan;
  96. font-size:12.0pt;
  97. font-family:"Times New Roman";
  98. mso-fareast-font-family:"Times New Roman";
  99. color:black;}
  100. pre
  101. {margin:0in;
  102. margin-bottom:.0001pt;
  103. mso-pagination:widow-orphan;
  104. 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;
  105. font-size:10.0pt;
  106. font-family:"Courier New";
  107. mso-fareast-font-family:"Courier New";
  108. color:black;}
  109. @page Section1
  110. {size:8.5in 11.0in;
  111. margin:1.0in 1.25in 1.0in 1.25in;
  112. mso-header-margin:.5in;
  113. mso-footer-margin:.5in;
  114. mso-paper-source:0;}
  115. div.Section1
  116. {page:Section1;}
  117. /* List Definitions */
  118. @list l0
  119. {mso-list-id:371000526;
  120. mso-list-type:hybrid;
  121. mso-list-template-ids:619977120 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
  122. @list l1
  123. {mso-list-id:745304408;
  124. mso-list-type:hybrid;
  125. mso-list-template-ids:501628894 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
  126. @list l2
  127. {mso-list-id:1382750078;
  128. mso-list-type:hybrid;
  129. mso-list-template-ids:-98557440 -1634539084 1364493882 -555997176 1048594918 1907263124 1809221600 353402950 -1899568204 803906870;}
  130. ol
  131. {margin-bottom:0in;}
  132. ul
  133. {margin-bottom:0in;}
  134. -->
  135. </style>
  136. <!--[if gte mso 9]><xml>
  137. <o:shapedefaults v:ext="edit" spidmax="1027"/>
  138. </xml><![endif]--><!--[if gte mso 9]><xml>
  139. <o:shapelayout v:ext="edit">
  140. <o:idmap v:ext="edit" data="1"/>
  141. </o:shapelayout></xml><![endif]-->
  142. </head>
  143. <body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:.5in'
  144. leftmargin=8>
  145. <div class=Section1>
  146. <h1><a name=MYSAMPLE>Sample WIA Microdriver</a></h1>
  147. <h1><span style='font-size:14.0pt;mso-bidi-font-size:24.0pt;color:red'>[This is
  148. preliminary documentation and subject to change.]<o:p></o:p></span></h1>
  149. <h2>SUMMARY</h2>
  150. <p>This sample shows how to write a Windows Image Acquisition (WIA) Microdriver
  151. for a flatbed scanner. The Microdriver architecture is functionally reduced
  152. from the WIA Minidriver architecture, but supports the primary scanning
  153. functions. Documentation on WIA Microdrivers is provided in the &#8220;Windows DDK
  154. &#8221;. This sample driver can be used as a starting
  155. point for your development, but your driver should access the scanner hardware
  156. through one of the kernel drivers provided with Windows.</p>
  157. <p>This
  158. sample will not work on Windows 98 or Windows 2000.</p>
  159. <h3>BUILDING THE SAMPLE</h3>
  160. <p>To build the sample follow these steps:</p>
  161. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
  162. tab-stops:list .5in'><![if !supportLists]>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  163. </span><![endif]>In the Start menu, select<span style="mso-spacerun:
  164. yes">&nbsp; </span>&quot;Free Build Environment&quot; or &quot;Checked Build
  165. Environment&quot; under &quot;Windows DDK&quot; to open a command window and
  166. set basic environment variables needed to build drivers. </p>
  167. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
  168. tab-stops:list .5in'><![if !supportLists]>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  169. </span><![endif]>Change to the directory containing the sample driver source
  170. code, src\preview\wdm\wia\microdrv.</p>
  171. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
  172. tab-stops:list .5in'><![if !supportLists]>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  173. </span><![endif]>Execute the &quot;build&quot; command. After the build
  174. completes, a driver named Testmcro.dll will be located in a subdirectory.</p>
  175. <h3>USING THE SAMPLE<o:p></o:p></h3>
  176. <p><! ---------------- Snip Snip ---------------- >To use the driver, first
  177. install it following these steps: </p>
  178. <ol start=1 type=1>
  179. <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  180. mso-list:l2 level1 lfo5;tab-stops:list .5in'>Copy Testmcro.dll from the
  181. subdirectory under Microdrv to a new, empty directory.</li>
  182. <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  183. mso-list:l2 level1 lfo5;tab-stops:list .5in'>Copy Testmcro.inf from the
  184. Microdrv directory to the same directory.</li>
  185. <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  186. mso-list:l2 level1 lfo5;tab-stops:list .5in'>In Millennium, open the &#8220;New
  187. Device&#8221; icon in the Scanners and Cameras control panel.</li>
  188. <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  189. mso-list:l2 level1 lfo5;tab-stops:list .5in'>Click the &#8220;Have Disk&#8221; button
  190. and enter the name of the folder created in step 1.</li>
  191. <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  192. mso-list:l2 level1 lfo5;tab-stops:list .5in'>Click OK, Next, or Finish
  193. until the wizard is finished.</li>
  194. </ol>
  195. <p>To test this driver, open the Scanners and Cameras folder in Explorer or use
  196. the Wiatest application.</p>
  197. <p>Use one of these options to test this driver:</p>
  198. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
  199. tab-stops:list .5in'><![if !supportLists]>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  200. </span><![endif]>The Scanners and Cameras Wizard accessible from the Start
  201. menu.</p>
  202. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
  203. tab-stops:list .5in'><![if !supportLists]>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  204. </span><![endif]>The Namespace extension accessible by opening the camera in
  205. Explorer.</p>
  206. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
  207. tab-stops:list .5in'><![if !supportLists]>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  208. </span><![endif]>The Wiatest application is provided in this DDK.</p>
  209. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
  210. tab-stops:list .5in'><![if !supportLists]>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  211. </span><![endif]>Microsoft Paint, a native WIA application.</p>
  212. <p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo7;
  213. tab-stops:list .5in'><![if !supportLists]>5.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  214. </span><![endif]>Any TWAIN compliant application.</p>
  215. <h3>RESOURCES</h3>
  216. <p>WIA information: <a href="http://www.microsoft.com/hwdev/tech/wia">http://www.microsoft.com/hwdev/tech/wia</a></p>
  217. <p>DDK information: <a href="http://www.microsoft.com/ddk/">http://www.microsoft.com/ddk/</a></p>
  218. <h3>CODE TOUR</h3>
  219. <h3>File Manifest</h3>
  220. <pre>Files<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Description</pre><pre>------------ -------------------------------------------------------</pre><pre>testmcro.cpp Implements the Microdriver</pre><pre>makefile<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>Used for building the driver--do not modify</pre><pre>resource.h<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>Header file for resources</pre><pre>sources<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Controls building of driver</pre><pre>testmcro.def Linker command file</pre><pre>testmcro.htm This readme</pre><pre>testmcro.inf Installation file</pre><pre>testmcro.h <span style="mso-spacerun: yes">&nbsp;&nbsp;</span>Main header file</pre><pre>testmcro.rc<span style="mso-spacerun: yes">&nbsp; </span>Resource definitions</pre><pre>testmcro.rcv<span style="mso-spacerun: yes">&nbsp;</span>Resource definitions</pre>
  221. </div>
  222. </body>
  223. </html>