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.

213 lines
8.0 KiB

  1. <html xmlns:v="urn:schemas-microsoft-com:vml"
  2. xmlns:o="urn:schemas-microsoft-com:office:office"
  3. xmlns:w="urn:schemas-microsoft-com:office:word"
  4. xmlns="http://www.w3.org/TR/REC-html40">
  5. <head>
  6. <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  7. <meta name=ProgId content=Word.Document>
  8. <meta name=Generator content="Microsoft Word 10">
  9. <meta name=Originator content="Microsoft Word 10">
  10. <link rel=File-List href="classpnp_files/filelist.xml">
  11. <title>ClassPnP</title>
  12. <!--[if gte mso 9]><xml>
  13. <w:WordDocument>
  14. <w:SpellingState>Clean</w:SpellingState>
  15. <w:GrammarState>Clean</w:GrammarState>
  16. <w:Compatibility>
  17. <w:UseFELayout/>
  18. </w:Compatibility>
  19. <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
  20. </w:WordDocument>
  21. </xml><![endif]-->
  22. <style>
  23. <!--
  24. /* Font Definitions */
  25. @font-face
  26. {font-family:"MS Mincho";
  27. panose-1:2 2 6 9 4 2 5 8 3 4;
  28. mso-font-alt:"\FF2D\FF33 \660E\671D";
  29. mso-font-charset:128;
  30. mso-generic-font-family:modern;
  31. mso-font-pitch:fixed;
  32. mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
  33. @font-face
  34. {font-family:Verdana;
  35. panose-1:2 11 6 4 3 5 4 4 2 4;
  36. mso-font-charset:0;
  37. mso-generic-font-family:swiss;
  38. mso-font-pitch:variable;
  39. mso-font-signature:536871559 0 0 0 415 0;}
  40. @font-face
  41. {font-family:"\@MS Mincho";
  42. panose-1:2 2 6 9 4 2 5 8 3 4;
  43. mso-font-charset:128;
  44. mso-generic-font-family:modern;
  45. mso-font-pitch:fixed;
  46. mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
  47. @font-face
  48. {font-family:"MS Sans Serif";
  49. panose-1:0 0 0 0 0 0 0 0 0 0;
  50. mso-font-alt:"Times New Roman";
  51. mso-font-charset:0;
  52. mso-generic-font-family:roman;
  53. mso-font-format:other;
  54. mso-font-pitch:auto;
  55. mso-font-signature:0 0 0 0 0 0;}
  56. /* Style Definitions */
  57. p.MsoNormal, li.MsoNormal, div.MsoNormal
  58. {mso-style-parent:"";
  59. margin:0in;
  60. margin-bottom:.0001pt;
  61. mso-pagination:widow-orphan;
  62. font-size:12.0pt;
  63. font-family:"Times New Roman";
  64. mso-fareast-font-family:"MS Mincho";
  65. color:black;}
  66. h2
  67. {color:black;}
  68. h3
  69. {color:black;}
  70. h4
  71. {color:black;}
  72. a:link, span.MsoHyperlink
  73. {color:blue;
  74. text-decoration:underline;
  75. text-underline:single;}
  76. a:visited, span.MsoHyperlinkFollowed
  77. {color:purple;
  78. text-decoration:underline;
  79. text-underline:single;}
  80. p
  81. {font-size:12.0pt;
  82. font-family:"Times New Roman";
  83. mso-fareast-font-family:"MS Mincho";
  84. color:black;}
  85. pre
  86. {margin-top:0in;
  87. margin-bottom:0in;
  88. margin-bottom:.0001pt;
  89. font-size:10.0pt;
  90. font-family:"Courier New";
  91. mso-fareast-font-family:"MS Mincho";
  92. color:black;}
  93. span.SpellE
  94. {mso-style-name:"";
  95. mso-spl-e:yes;}
  96. span.GramE
  97. {mso-style-name:"";
  98. mso-gram-e:yes;}
  99. @page Section1
  100. {size:8.5in 11.0in;
  101. margin:1.0in 1.25in 1.0in 1.25in;
  102. mso-header-margin:.5in;
  103. mso-footer-margin:.5in;
  104. mso-paper-source:0;}
  105. div.Section1
  106. {page:Section1;}
  107. -->
  108. </style>
  109. <!--[if gte mso 10]>
  110. <style>
  111. /* Style Definitions */
  112. table.MsoNormalTable
  113. {mso-style-name:"Table Normal";
  114. mso-tstyle-rowband-size:0;
  115. mso-tstyle-colband-size:0;
  116. mso-style-noshow:yes;
  117. mso-style-parent:"";
  118. mso-padding-alt:0in 5.4pt 0in 5.4pt;
  119. mso-para-margin:0in;
  120. mso-para-margin-bottom:.0001pt;
  121. mso-pagination:widow-orphan;
  122. font-size:10.0pt;
  123. font-family:"Times New Roman";}
  124. </style>
  125. <![endif]-->
  126. <meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
  127. <!--[if gte mso 9]><xml>
  128. <o:shapedefaults v:ext="edit" spidmax="2050"/>
  129. </xml><![endif]--><!--[if gte mso 9]><xml>
  130. <o:shapelayout v:ext="edit">
  131. <o:idmap v:ext="edit" data="1"/>
  132. </o:shapelayout></xml><![endif]-->
  133. </head>
  134. <body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
  135. leftmargin=8>
  136. <div class=Section1>
  137. <h2><a name=classpnp></a><span class=SpellE><span style='mso-bookmark:classpnp'><span
  138. style='font-family:Verdana'>ClassPnP</span></span></span><span
  139. style='mso-bookmark:classpnp'></span><span style='font-family:Verdana'> <o:p></o:p></span></h2>
  140. <h3><span style='font-family:Verdana'>Summary<o:p></o:p></span></h3>
  141. <p><span style='font-size:10.0pt;font-family:Verdana'>This is the library for
  142. all storage drivers. It simplifies writing a storage driver by implementing 90
  143. percent of the code required to support Plug and Play, Power Management, et
  144. cetera. This library is used by <span class=SpellE>disk.sys</span>, <span
  145. class=SpellE>cdrom.sys</span> and the tape class drivers.<o:p></o:p></span></p>
  146. <p><span style='font-size:10.0pt;font-family:Verdana'>No INF file is needed to
  147. install this library.<o:p></o:p></span></p>
  148. <h3><span style='font-family:Verdana'>Building the Sample<o:p></o:p></span></h3>
  149. <p><span style='font-size:10.0pt;font-family:Verdana'>To build the sample, run <b>build</b>.
  150. Once built, one binary will be created: <span class=SpellE>classpnp.sys</span>.
  151. This sample is based on live source code, and only builds in the current OS
  152. build environment.<span style='mso-spacerun:yes'></span><o:p></o:p></span></p>
  153. <h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
  154. <h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
  155. <pre><u>File<span style='mso-tab-count:3'>������������������ </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
  156. class=SpellE>Autorun.c</span><span style='mso-tab-count:2'>������������� </span>Media change notification (MCN) code</pre><pre><span
  157. class=SpellE>Class.c</span><span style='mso-tab-count:1'> </span><span
  158. style='mso-tab-count:1'>������� </span>Main code base</pre><pre><span
  159. class=SpellE>Class.rc</span><span style='mso-tab-count:2'>�������������� </span>Resource file</pre><pre><span
  160. class=SpellE>Class.src</span><span style='mso-tab-count:2'>������������� </span>Exports</pre><pre><span
  161. class=SpellE>Classp.h</span><span style='mso-tab-count:2'>�������������� </span>Private <span
  162. class=GramE>header</span></pre><pre><span class=SpellE>Classwmi.c</span><span
  163. style='mso-tab-count:2'>������������ </span>WMI functionality</pre><pre><span
  164. class=SpellE>Create.c</span><span style='mso-tab-count:2'>�������������� </span>Create IRP code</pre><pre><span
  165. class=SpellE>Dictlib.c</span><span style='mso-tab-count:2'>������������� </span>File system dictionary code</pre><pre><span
  166. class=SpellE>Lock.c</span><span style='mso-tab-count:2'>�������� </span>Storage <span
  167. class=GramE>remove</span> lock implementation</pre><pre><span class=SpellE>Makefile</span><span
  168. style='mso-tab-count:2'>�������������� </span><span class=SpellE>Makefile</span></pre><pre><span
  169. class=SpellE>Power.c</span><span style='mso-tab-count:2'>������� </span>Power code</pre><pre><span
  170. class=SpellE>Power.h</span><span style='mso-tab-count:2'>������� </span>Power code header file</pre><pre>Sources<span
  171. style='mso-tab-count:2'>������� </span>Sources file</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
  172. <p align=center style='text-align:center;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'><span
  173. style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
  174. style='font-family:Verdana'>Top of page</span></a></span><span
  175. style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
  176. <o:p></o:p></span></p>
  177. <pre><o:p>&nbsp;</o:p></pre>
  178. <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
  179. style='width:6.5in;mso-cellspacing:0in'>
  180. <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:1.5pt'>
  181. <td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
  182. <p class=MsoNormal><o:p>&nbsp;</o:p></p>
  183. </td>
  184. </tr>
  185. </table>
  186. <pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
  187. <p style='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'><span
  188. style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>�
  189. 1999 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
  190. Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
  191. </div>
  192. </body>
  193. </html>