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.

211 lines
11 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <!-- saved from url=(0056)file://Z:\sdktools\ddk\src\setup\inf\MultiOS\MultiOS.htm -->
  3. <HTML><HEAD><TITLE>Sample INF File Readme</TITLE>
  4. <META http-equiv=Content-Type content="text/html; charset=windows-1252">
  5. <META content="MSHTML 6.00.3586.0" name=GENERATOR></HEAD>
  6. <BODY link=#0000ff><FONT face=Verdana size=5>
  7. <H2>MultiOS.INF - SAMPLE INF FILE</H2></FONT><FONT face=Verdana size=2>
  8. <P><SPAN style="FONT-SIZE: 10pt; COLOR: #ff0000; FONT-FAMILY: Arial">[This is
  9. preliminary documentation and subject to change.]</SPAN></P>
  10. <H3>SUMMARY</H3>
  11. <P><B><I>MultiOS.inf</I></B> is a sample INF file that illustrates the general
  12. structure for using a single INF file to install different printer drivers on
  13. Windows� Server 2003, Windows� XP, Windows� 2000, and Windows� 9x (encompassing Windows 98, Windows 98
  14. Second Edition, and Windows Millennium).</P>
  15. <P>The sample includes specific INF constructs to demonstrate the following
  16. concepts:</P>
  17. <BLOCKQUOTE>
  18. <P>Platform extensions, including consistent usage throughout the INF
  19. file.</P></BLOCKQUOTE>
  20. <BLOCKQUOTE>
  21. <P>Installation on multiple platforms from one INF file.</P></BLOCKQUOTE>
  22. <BLOCKQUOTE>
  23. <P>Installation of different local language versions of binaries from one INF
  24. file.</P></BLOCKQUOTE>
  25. <P>Review this document carefully, taking careful note of the sample's
  26. limitations.</P>
  27. <H3>USING THE SAMPLE</H3>
  28. <P>In addition to the contents of this document, the sample INF file contains
  29. explanatory comments throughout.</P>
  30. <P>Users of this sample INF file will need to add their own information,
  31. including file names, registry information, and company information in the
  32. <I>Strings</I> section, and adding additional <I>Strings</I> sections for
  33. additional local language support and so forth.</P>
  34. <P>The sample INF file includes several <I>DDInstall</I>-related sections that
  35. are used on more than one Windows platform. These sections are:</P>
  36. <BLOCKQUOTE>
  37. <P><I>CommonXPAddReg</I>, <I>WinXPCopyDriver</I> and <I>WinXPCopyDlls</I> -
  38. common sections for installing on both platforms (x86 and ia64) for Windows XP
  39. only.</P></BLOCKQUOTE>
  40. <BLOCKQUOTE>
  41. <P><I>WinXPServiceInstallSection</I> and <I>WinXPServiceAddReg</I> - common
  42. service installation sections for installing on both platforms (x86 and ia64)
  43. for Windows XP only.</P></BLOCKQUOTE>
  44. <BLOCKQUOTE>
  45. <P><I>CommonAddReg</I> - common registry section for installing on all
  46. supported platforms - Windows 9x/ME, Windows 2000, and Windows
  47. XP.</P></BLOCKQUOTE>
  48. <P>When possible, the use of common sections reduces the likelihood of
  49. introducing errors in the completed INF file, while reducing the size and
  50. complexity of the INF file as well.</P>
  51. <P>This sample INF file is saved as plain ASCII text (using Windows Notepad with
  52. the default ANSI encoding). As part of customizing this INF file for installing
  53. a specific device, you may need to save the INF file with Unicode encoding.
  54. Unicode allows the INF file writer the flexibility to mix locales that use
  55. different ANSI codepages. To save any text file with Unicode encoding using
  56. Windows Notepad, follow these steps:</P>
  57. <LI>Click the Notepad <I>File</I> Menu.
  58. <LI>Select <I>Save As</I>.
  59. <LI>Click the <I>Encoding</I> drop-down list, and select the preferred Unicode
  60. encoding.
  61. <LI>Click <I>Save</I> to save the file.
  62. <P>Microsoft provides two useful tools for checking INF file structure and
  63. syntax:</P>
  64. <BLOCKQUOTE>
  65. <P><I>ChkINF</I> is a Perl script that checks the structure and syntax of
  66. Microsoft� Windows� 2000, Windows� XP and Windows� Server 2003 driver INF files. Results are
  67. presented in HTML format, and include a list of the errors and warnings
  68. detected in each INF file, with each error and warning shown next to the
  69. errant INF file entry. ChkINF is available in this DDK in the
  70. <I>tools\chkinf</I> directory.</P></BLOCKQUOTE>
  71. <BLOCKQUOTE>
  72. <P><I>Signability</I> is a tool for ensuring that a driver package can be
  73. properly signed after it passes Designed for Windows Logo testing. Signability
  74. is available for download from the Hardware Compatibility Test Kit Web site at
  75. <A
  76. href="http://www.microsoft.com/hwtest/testkits">http://www.microsoft.com/hwtest/testkits</A>.</P></BLOCKQUOTE>
  77. <P>Both of these tools are included in the Hardware Compatibility Test Kits used
  78. for Designed for Windows Logo testing.</P>
  79. <H4>Suggested Media Layout</H4>
  80. <P>Many devices are distributed with accompanying media (typically a CD)
  81. containing drivers targeted at multiple local languages and multiple versions of
  82. Windows. The table below presents one possible structure for organizing such
  83. media, so that multiple languages can be supported on Windows 9x, Windows NT
  84. 4.0, Windows 2000, Windows XP and Windows Server 2003.</P></FONT><FONT face=Courier size=2>
  85. <TABLE cellSpacing=20 cellPadding=0 border=0>
  86. <TBODY>
  87. <TR>
  88. <TD><U>Directory</U></TD>
  89. <TD><U>Containing INF File<U></U></U></TD>
  90. <TD><U>Notes<U></U></U></TD></TR>
  91. <TR>
  92. <TD>\ (root directory)</TD>
  93. <TD>NT4.inf</TD>
  94. <TD>Unsigned Unicode INF file for Windows NT 4.0 only</TD></TR>
  95. <TR>
  96. <TD>\Windows</TD>
  97. <TD>MultiOS.inf</TD>
  98. <TD>Signed Unicode INF file for Windows Server 2003, Windows 2000 and Windows XP</TD></TR>
  99. <TR>
  100. <TD>\Win9xeng</TD>
  101. <TD>Win9xEng.inf</TD>
  102. <TD>Signed English language INF file for Windows 9x only</TD></TR>
  103. <TR>
  104. <TD>\Win9xFra</TD>
  105. <TD>Win9xFra.inf</TD>
  106. <TD>Signed French language INF file for Windows 9x only</TD></TR>
  107. <TR>
  108. <TD>\Win9xGer</TD>
  109. <TD>Win9xGer.inf</TD>
  110. <TD>Signed German language INF file for Windows 9x
  111. only</TD></TR></TBODY></TABLE><FONT face=Verdana size=2>
  112. <H5>Some notes about this Suggested Media Layout</H5>
  113. <BLOCKQUOTE>
  114. <P>Windows 9x does not recognize or handle localized <I>Strings.LanguageID</I>
  115. sections, necessitating the use of individual INF files for each supported
  116. locale.</P></BLOCKQUOTE>
  117. <BLOCKQUOTE>
  118. <P>Windows 9x does not recognize INF files stored with Unicode encoding, and
  119. will ignore any Unicode INF files it might encounter. In this media layout,
  120. the INF files targeted at non-Windows 9x platforms are saved with Unicode
  121. encoding, so Windows 9x will not see them. If this layout were presented to a
  122. Windows 9x user, the user would see a list that included only the Windows 9x
  123. INF files, and none of the Unicode INF files targeted at Windows NT 4.0,
  124. Windows 2000 or Windows XP or Windows Server 2003.</P></BLOCKQUOTE>
  125. <BLOCKQUOTE>
  126. <P>Because there is no way to differentiate a Windows NT 4.0 INF file from a
  127. joint Windows 2000/Windows XP/Windows Server 2003 INF file, a separate INF file should be provided
  128. for Windows NT 4.0 support. In the table above, the Windows NT 4.0 INF file is
  129. placed in the root directory of the media for easy discovery by Windows NT 4.0
  130. users.</P></BLOCKQUOTE>
  131. <BLOCKQUOTE>
  132. <P>Windows NT 4.0 does not recognize driver signatures, so the INF file for
  133. Windows NT 4.0 can be unsigned. Even though this file will appear as a valid
  134. INF file to Windows 2000, Windows XP and Windows Server 2003, if the INF file (MultiOS.inf in the
  135. table above) targeted at these versions of Windows is signed, both of these
  136. versions of Windows will choose the signed INF file in preference to the
  137. unsigned INF file. See the "How Setup Selects Drivers" topic in the Windows
  138. DDK Documentation for additional details.</P></BLOCKQUOTE>
  139. <H4>Warnings Generated by the ChkINF Tool</H4>
  140. <P>The ChkINF tool reports zero errors and the following four warnings when
  141. executed on this sample INF file:</P><FONT color=blue>
  142. <LI><A>Line 95</A>: (W22.1.2208) NT-specific section(s) found. Ignoring general
  143. section.
  144. <LI><A>Line 95</A>: (W22.1.2083) Section [DRIVERINSTALL] not referenced
  145. <LI><A>Line 101</A>: (W22.1.2083) Section [WIN9XADDREG] not referenced
  146. <LI><A>Line 104</A>: (W22.1.2083) Section [WIN9XCOPYFILES] not referenced
  147. </FONT><BR>
  148. <P>The first warning, "NT-specific section(s) found. Ignoring general section",
  149. indicates that this INF file contains installation sections that are decorated
  150. with platform extensions (<I>.NTx86</I> and <I>.NTia64</I>), as well as plain,
  151. undecorated installation sections ("DriverInstall" for example). Since ChkINF
  152. detected the decorated sections, it will not check any undecorated
  153. <I>DDInstall</I> sections it finds.</P>
  154. <P>The other three warnings are related to the first. While ChkINF will not
  155. check undecorated <I>DDInstall</I> sections, it will report any unreferenced
  156. sections as an aid to INF developers. These three warnings are simply stating
  157. that these sections are not referenced anywhere else in the INF file. (Actually,
  158. the second and third unreferenced sections, "Win9xAddReg" and "Win9xCopyFiles",
  159. are referenced in the first unreferenced section, "DriverInstall". Due to
  160. presence of decorated <I>DDInstall</I> sections, ChkINF will not check this
  161. undecorated <I>DDInstall</I> section, and it and the two sections it references
  162. are thereby reported as unreferenced.)</P>
  163. <H3>LIMITATIONS</H3>
  164. <P>This INF file is incomplete. Users of this sample will need to add their own
  165. information, including file names, registry information, and company information
  166. in the <I>Strings</I> section and so forth.</P>
  167. <P>Note that Windows 9x does not recognize or handle localized
  168. <I>Strings.LanguageID</I> sections, and so the localization techniques
  169. exemplified in the sample INF file cannot be used on Windows 9x. See the section
  170. entitled <I>Suggested Media Layout</I> above for suggestions on handling Windows
  171. 9x. The installation sections for Windows 9x that are present in the INF file
  172. are included for illustrative purposes only.</P>
  173. <P>As discussed in <I>Warnings Generated by the ChkINF Tool</I> above, the
  174. ChkINF tool reports zero errors and four warnings when executed on the sample
  175. INF file. These four warnings represent known issues with the INF file, and can
  176. be readily explained. Use of the ChkINF tool is strongly recommended when
  177. writing INF files.</P>
  178. <P>As noted in <I>Using the Sample</I> above, this sample INF file is saved as
  179. plain ASCII text (saved from Windows Notepad with the default ANSI
  180. encoding).</P>
  181. <H3>CODE TOUR</H3>
  182. <H4>File Manifest</H4></FONT><FONT face=Courier size=3>
  183. <TABLE cellSpacing=10 cellPadding=0 border=0>
  184. <TBODY>
  185. <TR>
  186. <TD><U>File</U></TD>
  187. <TD><U>Description<U></U></U></TD></TR>
  188. <TR>
  189. <TD><I>MultiOS.htm</I></TD>
  190. <TD>Readme for MultiOS.inf (this file).</TD></TR>
  191. <TR>
  192. <TD><I>MultiOS.inf</I></TD>
  193. <TD>Sample multi-platform, multi-language INF
  194. file.</TD></TR></TBODY></TABLE><FONT face=Verdana size=2>
  195. <H3>FEEDBACK</H3>
  196. <P>We welcome your comments, problem reports and wish-list requests. Please
  197. submit them by pointing your Internet browser to <A
  198. href="http://www.microsoft.com/ddk">http://www.microsoft.com/ddk</A>.
  199. </FONT></P>
  200. <P align=center><FONT face=Verdana size=2><A
  201. href="file:///Z:/sdktools/ddk/src/setup/inf/MultiOS/MultiOS.htm#top">Top of
  202. page</A> </P></FONT>
  203. <TABLE cellSpacing=0 width=624 border=0>
  204. <TBODY>
  205. <TR>
  206. <TD vAlign=center bgColor=#00ffff height=2></TD></TR></TBODY></TABLE><FONT
  207. face="MS Sans Serif" size=1>
  208. <P>� Microsoft Corporation 2001-2003</FONT><FONT face=Verdana size=2>
  209. </P></FONT></FONT>
  210. <UL></UL></LI></FONT></BODY></HTML>