home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / books / wdinstal.db < prev    next >
Encoding:
Text File  |  1991-03-01  |  95.8 KB  |  1,935 lines

  1. %@1@%%@AB@%Microsoft  Windows  Device Development Kit - Installation and Update%@EH@%
  2.                                   %@AB@%Guide - %@AE@%%@NL@%
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. ────────────────────────────────────────────────────────────────────────────%@NL@%
  12. %@AB@%Microsoft (R) Windows (tm) Device Development Kit - Installation and Update
  13. %@AB@%Guide - %@AE@%%@NL@%
  14.  
  15. %@AB@%development tools for providing Microsoft Windows device support
  16. %@AB@%VERSION 3.0%@AE@%
  17. ────────────────────────────────────────────────────────────────────────────%@NL@%
  18.  
  19.  
  20. for the MS-DOS (R) or PC-DOS Operating System%@NL@%
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. Microsoft Corporation %@NL@%
  29.  
  30. Information in this document is subject to change without notice and does
  31. not represent a commitment on the part of Microsoft Corporation. The
  32. software described in this document is furnished under a license agreement
  33. or nondisclosure agreement. The software may be used or copied only in
  34. accordance with the terms of the agreement. It is against the law to copy
  35. the software on any medium except as specifically allowed in the license or
  36. nondisclosure agreement. No part of this manual may be reproduced or
  37. transmitted in any form or by any means, electronic or mechanical, including
  38. photocopying and recording, for any purpose without the express written
  39. permission of Microsoft.  
  40. U.S. Government Restricted Rights
  41.  
  42.  
  43. The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. Use,
  44. duplication, or disclosure by the Government is subject to restrictions as
  45. set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and
  46. Computer Software clause at DFARS 252.227-7013 or subparagraphs (c) (1) and
  47. (2) of the Commercial Computer Software 
  48. ─ Restricted Rights at 48 CFR 52.227-19, as applicable.
  49. Contractor/manufacturer is Microsoft Corporation/One Microsoft Way/Redmond,
  50. WA 98052-6399.%@NL@%
  51.  
  52.  
  53. (C) Copyright Microsoft Corporation, 1990. All rights reserved.
  54.  
  55. Simultaneously published in the U.S. and Canada.%@NL@%
  56.  
  57.  
  58. Printed and bound in the United States of America.%@NL@%
  59.  
  60.  
  61. Microsoft, MS, MS-DOS, GW-BASIC, QuickC, CodeView, the 
  62. Microsoft logo, and XENIX are registered trademarks and Windows,
  63. Windows/286, 
  64. and Windows/386 are trademarks of Microsoft Corporation.%@NL@%
  65.  
  66. AT&T is a registered trademark of American Telephone 
  67. and Telegraph Company.%@NL@%
  68.  
  69. COMPAQ is a registered trademark of Compaq Computer Corporation.%@NL@%
  70.  
  71. Epson is a registered trademark of Epson America, Inc.%@NL@%
  72.  
  73. Hercules is a registered trademark of Hercules Computer 
  74. Technology.%@NL@%
  75.  
  76. HP, LaserJet, and PCL are registered trademarks of Hewlett-Packard 
  77. Company.%@NL@%
  78.  
  79. IBM is a registered trademark of International Business 
  80. Machines Corporation.%@NL@%
  81.  
  82. Intel is a registered trademark and 386 is a trademark 
  83. of Intel Corporation.%@NL@%
  84.  
  85. Paintbrush is a registered trademark of Zsoft Corporation.%@NL@%
  86.  
  87. PostScript is a registered trademark of Adobe Systems, 
  88. Inc.%@NL@%
  89.  
  90. Video Seven is a trademark of Headland Technology, Inc.%@NL@%
  91.  
  92. The Symbol fonts provided with Windows 3.0 are based 
  93. on the CG Times font, a product of AGFA Compugraphic Division of Agfa 
  94. Corporation.%@NL@%
  95.  
  96. Document No. SY0324-300-R00-1089 %@NL@%
  97.  
  98. %@NL@%
  99.  
  100.  
  101.  
  102.  
  103.  
  104. %@AB@%Chapter 1%@AE@%%@BO:        1d64@%  %@AB@%Overview of the Windows 3.0 DDK%@AE@%
  105.  
  106.      1.1%@BO:        21da@%   New Features in Windows 3.0
  107.      1.2%@BO:        2792@%   Changes in the New DDK
  108.      1.3%@BO:        2b00@%   Contents of the Device Development Kit
  109.      1.4%@BO:        3ad6@%   Where to Look in the DDK Documentation Set
  110.  
  111. %@AB@%Chapter 2%@AE@%%@BO:        4a0b@%  %@AB@%Deciding on Whether or Not to Update%@AE@%
  112.  
  113.      2.1%@BO:        4bb0@%   Updating 2.x Drivers to Run Under Windows 3.0
  114.      2.2%@BO:        582f@%   Updating Windows/386 2.x Virtual Devices to Run Under Windows 
  115.               3.0 386 Enhanced Mode
  116.  
  117. %@AB@%Chapter 3%@AE@%%@BO:        5f3d@%  %@AB@%Required Development Environment%@AE@%
  118.  
  119.      3.1%@BO:        6389@%   Languages and Other Tools
  120.      3.2%@BO:        6828@%   Recommended Hardware
  121.      3.3%@BO:        6b3d@%   Updating the CONFIG.SYS and AUTOEXEC.BAT Files
  122.      3.4%@BO:        6cbd@%   Special Tools
  123.      3.5%@BO:        709e@%   Libraries
  124.      3.6%@BO:        73d2@%   INCLUDE Files
  125.      3.7%@BO:        7e3a@%   Special INCLUDE Files For Building Virtual Devices
  126.      3.8%@BO:        81ed@%   Special Tools For Building Virtual Devices
  127.      3.9%@BO:        88bb@%   Summary List of Special Files
  128.  
  129. %@AB@%Chapter 4%@AE@%%@BO:        9106@%  %@AB@%Recommended Development Process%@AE@%
  130.  
  131.      4.1%@BO:        92be@%   Copy All Required Tools and Sources To Your Hard Disk
  132.      4.2%@BO:        9505@%   Familiarize Yourself With the Debugging Tools
  133.      4.3%@BO:        984c@%   Build a Sample Driver
  134.      4.4%@BO:        a098@%   Use the Test Applications
  135.      4.5%@BO:        a40c@%   Create a Distribution Disk
  136.  
  137. %@AB@%Chapter 5%@AE@%%@BO:        a60d@%  %@AB@%System Setup and Tools Installation%@AE@%
  138.  
  139.      5.1%@BO:        a872@%   Copy the Required Files From the Disks
  140.      5.2%@BO:        b0d6@%   Expand the Compressed Files to Their Normal Size
  141.      5.3%@BO:        b51c@%   Other Considerations
  142.      5.4%@BO:        ba3a@%   Checking Your Tools Setup
  143.  
  144. %@AB@%Chapter 6%@AE@%%@BO:        bea9@%  %@AB@%Windows 3.0 Device Driver Sources%@AE@%
  145.  
  146.      6.1%@BO:        ce3f@%   Display Driver Sources
  147.             6.1.1%@BO:        d212@%    1-Plane Drivers: CGA, EGA Monochrome, EGA High 
  148.                         Resolution B&W, Hercules, Plasma,and MCGA%@AI@%%@AE@%
  149.             6.1.2%@BO:        da68@%    4-Plane Drivers: EGA and VGA
  150.             6.1.3%@BO:        e202@%    8-Plane Drivers: Video Seven VGA and 8514/a%@AI@%%@AE@%
  151.             6.1.4%@BO:        ea46@%    Windows Real and Standard Mode Grabbers
  152.             6.1.5%@BO:        ef93@%    System Font Sources
  153.      6.2%@BO:        ff5a@%   Display Driver Test Applications
  154.      6.3%@BO:       1033b@%   Printer Driver Sources
  155.             6.3.1%@BO:       105bc@%    PCL/HP LaserJet Printer Driver%@AI@%%@AE@%
  156.             6.3.2%@BO:       10fbd@%    PostScript Printer Driver
  157.             6.3.3%@BO:       11b7a@%    Raster Driver Sample Sources
  158.      6.4%@BO:       1203d@%   Printer Driver Test Applications
  159.      6.5%@BO:       12435@%   Keyboard Driver Sources
  160.      6.6%@BO:       12946@%   Mouse Driver Sources
  161.      6.7%@BO:       12c60@%   COMM Driver Sources
  162.      6.8%@BO:       12ff5@%   Sound Driver Sources
  163.      6.9%@BO:       132e5@%   Network Driver Sources
  164.      6.10%@BO:       135f6@%  Network Driver and HCT Test Applications
  165.  
  166. %@AB@%Chapter 7%@AE@%%@BO:       13a8e@%  %@AB@%Windows 3.0 Virtual Device Sources%@AE@%
  167.  
  168.      7.1%@BO:       14709@%   The Display Devices (CGA, EGA, VGA, 8514/a, HERC)
  169.      7.2%@BO:       14eb6@%   The Display/Windows Interface (GRABBER)
  170.      7.3%@BO:       1579b@%   The DMA Device (VDMAD)
  171.      7.4%@BO:       15b77@%   The EBIOS Device (EBIOS)
  172.      7.5%@BO:       15e5d@%   The Hard Disk Device (VHD)
  173.      7.6%@BO:       160bb@%   The Keyboard Device (VKD)
  174.      7.7%@BO:       16342@%   The Mouse Device (VMD)
  175.      7.8%@BO:       1653a@%   The NetBIOS Device (VNETBIOS)
  176.      7.9%@BO:       16914@%   The Local DOS Network Device (LDOSNET)
  177.      7.10%@BO:       1706a@%  The BIOS Device (BIOSXLAT)
  178.      7.11%@BO:       17355@%  The Paging Device (PAGESWAP)
  179.      7.12%@BO:       17553@%  The Printer Device (VPD)
  180.      7.13%@BO:       177ee@%  The COMM Device (VCD)
  181.      7.14%@BO:       17a47@%  The COM Buffer Device (COMBUFF)
  182.      7.15%@BO:       17cf1@%  The Floppy Drive Device (VFD)
  183.  
  184.  
  185.  
  186. %@CR:C6A00010001 @%%@1@%%@AB@%Chapter 1  Overview of the Windows 3.0 DDK%@AE@%%@EH@%%@NL@%
  187. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  188.  
  189. The %@AI@%Microsoft%@AE@%(R) Windows(tm) Device Development Kit (DDK) provides
  190. documentation and sample sources to assist you in developing the features
  191. you may want to support in your Microsoft Windows 3.0 device drivers and/or
  192. virtual devices. Along with this DDK, you must purchase the %@AI@%Microsoft
  193. %@AI@%Windows Software Development Kit%@AE@% (SDK) and the retail Windows 3.0 software.
  194. We recommend you review the SDK documentation and install the software in
  195. that kit before installing the DDK. The SDK also contains some of the
  196. Windows tools you will need to build your driver.  %@NL@%
  197.  
  198. The primary objective of the Windows 3.0 DDK is to provide you with the
  199. updated tools and sample sources required to do the following:  %@NL@%
  200.  
  201.  
  202.   ■   Test, debug, and modify existing 2.x drivers to work properly under
  203.       Windows 3.0.%@NL@%
  204.  
  205.   ■   Develop a 3.0 driver that takes advantage of the new features provided
  206.       only in Windows 3.0.
  207. %@NL@%
  208.  
  209.  
  210.  
  211. %@2@%%@CR:C6A00010002 @%%@AB@%1.1  New Features in Windows 3.0%@AE@%%@EH@%%@NL@%
  212.  
  213. Windows 3.0 provides many enhancements over previous versions and added
  214. features. This section summarizes the major changes to the Windows
  215. environment. For further information on each item, refer to the
  216. documentation provided with the %@AI@%Microsoft Windows Software Development Kit%@AE@%
  217. (SDK).  %@NL@%
  218.  
  219.  
  220.   ■   A new user shell, file manager, and enhanced accessory programs%@NL@%
  221.  
  222.   ■   The ability to run in protected mode, which gives applications direct
  223.       access to extended memory%@NL@%
  224.  
  225.   ■   The swapping of memory pages to and from disk, which enables the
  226.       386(tm) enhanced mode of Windows to provide more virtual memory than
  227.       is physically available%@NL@%
  228.  
  229.   ■   Color palette management, which enables applications to take full
  230.       advantage of the color capabilities of a device%@NL@%
  231.  
  232.   ■   Device-independent color bitmap support%@NL@%
  233.  
  234.   ■   The availability of device-independent icons and cursors by
  235.       automatically selecting the appropriate device-specific image from a
  236.       set of images provided by the application%@NL@%
  237.  
  238.   ■   Improved network support%@NL@%
  239.  
  240.   ■   Changes to the application user interface, including the addition of
  241.       new dialog box controls, new menu types, and a more attractive system
  242.       font%@NL@%
  243.  
  244.   ■   Additional fonts for higher resolution displays, such as the 8514/a,
  245.       and for math symbols%@NL@%
  246.  
  247.  
  248.  
  249. %@2@%%@CR:C6A00010003 @%%@AB@%1.2  Changes in the New DDK%@AE@%%@EH@%%@NL@%
  250.  
  251. The 3.0 version of the %@AI@%Microsoft Windows Device Development Kit%@AE@% is
  252. substantially different from the previous version. The following list
  253. highlights the changes:  %@NL@%
  254.  
  255.  
  256.   ■   The Windows/286(tm) Device Driver Kit (DDK) and the Windows/386(tm)
  257.       Binary Adaptation Kit (BAK) have been combined into one %@AI@%Microsoft
  258. %@AI@%      Windows Device Development Kit%@AE@% (DDK).%@NL@%
  259.  
  260.   ■   All the files provided on the DDK disks are compressed and must be
  261.       expanded before using.%@NL@%
  262.  
  263.   ■   Additional sources have been provided on the disks.%@NL@%
  264.  
  265.   ■   The documentation is more extensive and totally reorganized.%@NL@%
  266.  
  267.   ■   Areas of duplication have been minimized by making numerous references
  268.       to the %@AI@%Microsoft Windows Software Development Kit%@AE@%.%@NL@%
  269.  
  270.  
  271.  
  272. %@2@%%@CR:C6A00010004 @%%@AB@%1.3  Contents of the Device Development Kit%@AE@%%@EH@%%@NL@%
  273.  
  274. The 3.0 version of the %@AI@%Microsoft Windows Device Development Kit%@AE@% now consists
  275. of the following:  %@NL@%
  276.  
  277.  
  278.   ■   %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@%, which covers how to
  279.       write or modify device drivers for Windows 3.0.%@NL@%
  280.  
  281.   ■   %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@%, which covers how to
  282.       write virtual devices for Windows 3.0 when running in 386 enhanced
  283.       mode.%@NL@%
  284.  
  285.   ■   %@AI@%Microsoft Windows Installation and Update Guide%@AE@%, which provides
  286.       information on the source code, test scripts, utilities, and building
  287.       tools provided with the DDK and the development environments required
  288.       for Windows 3.0 when running in either real, standard, or 386 enhanced
  289.       mode. %@NL@%
  290.  
  291.   ■   %@AI@%Microsoft Windows Printers and Fonts Kit%@AE@%, which includes information
  292.       on the Printer Font and Cartridge Metrics (PFM and PCM) file formats
  293.       and the new PFM Editor, along with technical notes on the PCL(R)/HP(R)
  294.       LaserJet(R) and PostScript(R) printer drivers. %@NL@%
  295.  
  296.   ■   Windows 3.0 driver and font sources:%@NL@%
  297.  
  298. %@STUB@%      1-plane mode (2 colors) display drivers and grabbers for CGA,
  299.       Hercules(R), Compaq(R) Plasma, IBM(R) MCGA, EGA high resolution black
  300.       and white, and EGA monochrome displays%@NL@%
  301.  
  302. %@STUB@%      4-plane mode (16 colors) display drivers and grabbers for EGA high
  303.       resolution and VGA displays%@NL@%
  304.  
  305. %@STUB@%      8-plane mode (256 colors) display drivers and grabbers for the Video
  306.       Seven(tm) VGA and 8514/a displays%@NL@%
  307.  
  308. %@STUB@%      Printer drivers for the PCL/HP LaserJet printer (HPPCL) and PostScript
  309.       printer (PSCRIPT) %@NL@%
  310.  
  311. %@STUB@%      Epson(R) 9-pin printer and IBM Color Printer driver sample sources%@NL@%
  312.  
  313. %@STUB@%      Mouse drivers for Microsoft bus or serial mouse%@NL@%
  314.  
  315. %@STUB@%      COMM driver source for parallel and serial ports (LPT1 - LPT3 and COM1
  316.       - COM4)%@NL@%
  317.  
  318. %@STUB@%      Sound driver source%@NL@%
  319.  
  320. %@STUB@%      Network driver source for Microsoft Network (MS-NET)%@NL@%
  321.  
  322. %@STUB@%      IBM AT-style keyboard driver and international keyboard tables%@NL@%
  323.  
  324. %@STUB@%      Fonts for CGA, EGA, VGA, and 8514/a resolution, including Windows 3.0
  325.       proportional system and Windows 2.x fixed-pitch system fonts%@NL@%
  326.  
  327.   ■   386 enhanced-mode virtual device sources:%@NL@%
  328.  
  329. %@STUB@%      CGA, Compaq Plasma, Hercules, EGA, VGA color, VGA monochrome, and
  330.       8514/a display (VDD)%@NL@%
  331.  
  332. %@STUB@%      CGA, Compaq Plasma, Hercules, EGA, VGA color, VGA monochrome, and
  333.       8514/a display/Windows interface (GRABBER)%@NL@%
  334.  
  335. %@STUB@%      Mouse pointing device (VMD)%@NL@%
  336.  
  337. %@STUB@%      Keyboard device (VKD)%@NL@%
  338.  
  339. %@STUB@%      Hard Disk device (VHD)%@NL@%
  340.  
  341. %@STUB@%      COMM port device (VCD)%@NL@%
  342.  
  343. %@STUB@%      COM Buffer device (COMBUFF)%@NL@%
  344.  
  345. %@STUB@%      DMA device (VDMAD)%@NL@%
  346.  
  347. %@STUB@%      Printer port device (VPD)%@NL@%
  348.  
  349. %@STUB@%      Floppy drive device (VFD)%@NL@%
  350.  
  351. %@STUB@%      NetBIOS device (VNETBIOS)%@NL@%
  352.  
  353. %@STUB@%      Network device (LDOSNET)%@NL@%
  354.  
  355. %@STUB@%      Extended (EBIOS) device (EBIOS)%@NL@%
  356.  
  357. %@STUB@%      Memory Page Swapping device (PAGESWAP)%@NL@%
  358.  
  359. %@STUB@%      ROM BIOS device (BIOSXLAT)%@NL@%
  360.  
  361.   ■   Utilities and building tools:%@NL@%
  362.  
  363. %@STUB@%      PFM Editor for PFM and PCM fonts (PFMEDIT.EXE)%@NL@%
  364.  
  365. %@STUB@%      PostScript resource tool for creating Windows Printer Description
  366.       (WPD) files (MKPRN.EXE)%@NL@%
  367.  
  368. %@STUB@%      A special version of the C Linker (LINK4.EXE)%@NL@%
  369.  
  370. %@STUB@%      MASM 5.10B for 386 virtual devices (MASM5.EXE)%@NL@%
  371.  
  372. %@STUB@%      LINK386 for 386 virtual devices (LINK386.EXE)%@NL@%
  373.  
  374. %@STUB@%      Special Add Header utility for 386 virtual devices (ADDHDR.EXE)%@NL@%
  375.  
  376. %@STUB@%      Special MAPSYM for 386 virtual devices (MAPSYM32.EXE)%@NL@%
  377.  
  378. %@STUB@%      Test scripts and files for printers, displays, and networks and for
  379.       overall hardware compatibility%@NL@%
  380.  
  381.  
  382.  
  383. %@2@%%@CR:C6A00010005 @%%@AB@%1.4  Where to Look in the DDK Documentation Set%@AE@%%@EH@%%@NL@%
  384.  
  385. The %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@% provides detailed
  386. information on the new Windows 3.0 feature support you should consider
  387. implementing in your device driver. The sample sources for the device
  388. drivers provided on the DDK disks contain additional examples of how to
  389. support these new features. See Chapter 6, "Windows 3.0 Device Driver
  390. Sources," of this guide for more information on the sample sources.  %@NL@%
  391.  
  392. You should review each chapter that applies to your type of device. A
  393. complete list with descriptions of each chapter is provided in the
  394. "Introduction to Device Drivers." The following is simply an overview of
  395. what you will find in the DDK documentation.  %@NL@%
  396.  
  397. Chapter 2, "Display Drivers," and Chapter 3, "Display Drivers: New
  398. Features," contain new information on writing display drivers and on the new
  399. Windows 3.0 features such as:  %@NL@%
  400.  
  401.  
  402.   ■   Color-palette management%@NL@%
  403.  
  404.   ■   Device-independent bitmaps (DIBs)%@NL@%
  405.  
  406.   ■   Greater than (>) 64K font support%@NL@%
  407.  
  408.   ■   Running in protected mode%@NL@%
  409.  
  410.   ■   Support for new visuals (cursors, icons, and bitmaps)%@NL@%
  411.  
  412.  
  413. Chapter 5, "Printer Drivers," contains new information on writing printer
  414. drivers. One of the major discussions is on device initialization. Two new
  415. APIs have been added to Windows 3.0 to give Windows applications the ability
  416. to initialize printer settings: %@AB@%ExtDeviceMode()%@AE@% and %@AB@%DeviceCapabilities()%@AE@%.
  417. Your printer driver should support these new functions. New printer escapes
  418. have also been added (mainly for high end devices) and some have been
  419. updated. You should evaluate if your driver needs to support the new escapes
  420. or if you need to modify any existing ones. Chapter 11, "Device Driver
  421. Escapes," provides descriptions of all the escapes.  %@NL@%
  422.  
  423. The Windows 3.0 SDK documentation provides an overview of the new Help
  424. system provided under Windows 3.0. You should consider using the Help system
  425. for Windows printer and network drivers in place of README.TXT files. The
  426. PCL/HP LaserJet and PostScript printer driver sources included in this kit
  427. demonstrate the use of the Help manager (the Help button is accessible via
  428. the printer dialog box).  %@NL@%
  429.  
  430. Chapter 6, "Network Support," and Chapter 7, "Network Drivers," document the
  431. new Windows network interface.  %@NL@%
  432.  
  433. Chapter 8, "Keyboard Drivers," documents the new keyboard structure
  434. supported under Windows 3.0. If you are writing a keyboard driver, you
  435. should review this information.  %@NL@%
  436.  
  437. Chapter 9, "Miscellaneous Drivers," discusses the sound, communications, and
  438. mouse drivers. No new support has been added in the sound and mouse drivers
  439. other than modifications to run correctly in protected mode. The COMM driver
  440. has been enhanced to support COM1 through COM4 and to run in protected mode.
  441. %@NL@%
  442.  
  443. Chapter 10, "Common Functions," contains information on the common functions
  444. used by different types of graphics device drivers. You should be sure to
  445. review the new enhancements to %@AB@%StretchBlt()%@AE@% if you are writing a display or
  446. printer driver.  %@NL@%
  447.  
  448. Chapter 16, "Overview of Windows in 386 Enhanced Mode," summarizes how
  449. installable virtual devices work under Windows 3.0, but you should read all
  450. the chapters in the %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@% for
  451. complete details on this new support.  %@NL@%
  452.  
  453. A complete reference to all the new virtual device functions and services
  454. has been provided in that document's Part 4, "Virtual Device Services." In
  455. addition, we have provided on the DDK disks various sample virtual device
  456. sources demonstrating the use of the Virtual Machine Manager (VMM) services.
  457. See Chapter 7, "Windows 3.0 Virtual Device Sources," of this guide for more
  458. information on the sample sources.  %@NL@%
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465. %@CR:C6A00020001 @%%@1@%%@AB@%Chapter 2  Deciding on Whether or Not to Update%@AE@%%@EH@%%@NL@%
  466. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  467.  
  468. The following two sections provide background information to help you
  469. determine whether you will need to write a new device driver and/or virtual
  470. device, or simply update your existing 2.x driver and/or virtual device.  %@NL@%
  471.  
  472.  
  473. %@2@%%@CR:C6A00020002 @%%@AB@%2.1  Updating 2.x Drivers to Run Under Windows 3.0%@AE@%%@EH@%%@NL@%
  474.  
  475. Because of the new protected-mode memory model, it will probably be
  476. necessary for you to update your device driver to work properly under
  477. Microsoft Windows 3.0 when running in standard and 386 enhanced mode (both
  478. of which run with the processor in protected mode). Certain coding rules
  479. need to be followed to avoid General Protection (GP) violations that stop
  480. the execution of Windows. (See the SDK documentation for details on memory
  481. management and the rules for protected mode. See also Chapter 3, "Display
  482. Drivers: New Features," in the %@AI@%Microsoft Windows Device Driver Adaptation
  483. %@AI@%Guide%@AE@%.) Notice that users do have the option of running Windows in real mode
  484. to run 2.x level Windows applications and drivers. However, they then lose
  485. the additional memory capability of Windows 3.0.  %@NL@%
  486.  
  487. When running in protected mode, Windows 3.0 will check each driver loaded to
  488. verify that it has been marked for running in protected mode. Windows 3.0
  489. may refuse then to load some 2.x drivers. The display, communications,
  490. mouse, sound, system, and keyboard drivers fall into this category because
  491. they are integral to the system. If they fail, Windows will crash.  %@NL@%
  492.  
  493. When attempting to load Windows with a 2.x driver, an error message is
  494. displayed and you are returned to the MS-DOS(R) prompt. However, printer and
  495. network drivers are exceptions and are treated similarly to 2.x
  496. applications. This is because they are loaded and run only on the behalf of
  497. particular applications. Therefore, if the driver fails, only the current
  498. application is affected. For example, when a 2.x printer driver is loaded, a
  499. warning message dialog box is displayed in Windows. This can occur many
  500. times within a work session, depending on the currently active application.
  501. %@NL@%
  502.  
  503. With this in mind, it is important for you to evaluate your current level of
  504. support and determine which of the following options you choose to follow:  %@NL@%
  505.  
  506.  
  507.   1.  Develop a new Windows 3.0 driver that is based on your existing 2.x
  508.       driver or from the driver samples in this kit and built with the 3.0
  509.       tools.%@NL@%
  510.  
  511. %@STUB@%      This is the most desirable solution since your driver will be able to
  512.       take full advantage of the new 3.0 features. The user will also get
  513.       the full benefit of the Windows product and your hardware device.%@NL@%
  514.  
  515.   2.  Test, debug, and mark your existing driver to run under Windows 3.0.
  516.       However, this is not an option for display or keyboard drivers. This
  517.       will enable your driver to run under both Windows 2.x and Windows 3.0
  518.       in real and protected mode.%@NL@%
  519.  
  520. %@STUB@%      The driver should be built with the Windows/286 2.1 DDK tools. Then,
  521.       you will need to use the MARK utility supplied in the 3.0 SDK to mark
  522.       your driver for memory use. Notice that drivers built with the 3.0
  523.       tools will %@AI@%not%@AE@% run under Windows 2.x.%@NL@%
  524.  
  525. %@STUB@%      Although this is not the most desirable option, it does at least give
  526.       the user the opportunity to run Windows 3.0 with full protected-mode
  527.       memory support.%@NL@%
  528.  
  529.  
  530.  
  531. %@2@%%@CR:C6A00020003 @%%@AB@%2.2  Updating Windows/386 2.x Virtual Devices to Run Under Windows 3.0 386%@EH@%
  532. %@AB@%Enhanced Mode%@AE@%%@NL@%
  533.  
  534. Under 386 enhanced mode in Windows 3.0, a new structure for installable
  535. virtual device support has been added. The interface for virtual devices is
  536. very different from the 2.x versions of Windows/386. All new DDK
  537. documentation has been written to cover the new support available in Windows
  538. 3.0 when running in 386 enhanced mode.  %@NL@%
  539.  
  540. The 2.x versions of Windows/386 virtual devices (VxD) are not compatible
  541. with Windows 3.0 when running in 386 enhanced mode because of this new
  542. interface. You should evaluate whether or not it is more beneficial for you
  543. to convert your existing VxD to the new interface or to start building a new
  544. VxD based on the sample sources provided in this kit. This decision will
  545. depend on your device and the extent to which you choose to support it. (See
  546. Chapter 1, "Overview of Windows," in the %@AI@%Microsoft Windows Device Driver
  547. %@AI@%Adaptation Guide%@AE@% for estimates of the time required to write various
  548. drivers.)  %@NL@%
  549.  
  550. You also need to be aware of the following:  %@NL@%
  551.  
  552.  
  553.   ■   The OFFSET32 macro should be used, in place of the standard MASM
  554.       OFFSET directive, in all virtual device code. This will allow the code
  555.       to adapt to future versions of the macro assembler. (See Chapter 17,
  556.       "Virtual Device Programming Topics," in the %@AI@%Microsoft Windows Virtual
  557. %@AI@%      Device Adaptation Guide%@AE@% for more information on this macro.)%@NL@%
  558.  
  559.   ■   The V86 Memory Manager (V86MMGR) services enable real-mode devices to
  560.       tell 386 enhanced mode about the API they provide and enable a generic
  561.       virtual device to map these calls between virtual 8086 and protect
  562.       modes.
  563. %@NL@%
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571. %@CR:C6A00030001 @%%@1@%%@AB@%Chapter 3  Required Development Environment%@AE@%%@EH@%%@NL@%
  572. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  573.  
  574. The tools and documentation in the Microsoft Windows 3.0 SDK are %@AI@%required%@AE@%
  575. for developing device drivers and virtual devices. There are several
  576. references to the SDK documentation throughout the DDK. You should plan to
  577. review first the documentation provided in the SDK to get a better
  578. understanding of the new feature support available in Windows 3.0. The DDK
  579. documentation contains additional information on these subjects, as
  580. necessary for writing Windows device drivers and virtual devices. When
  581. writing 386 enhanced-mode virtual devices, you will need to use the tools
  582. available in both the Windows 3.0 SDK and DDK.  %@NL@%
  583.  
  584. To get technical assistance while you are developing your driver or virtual
  585. device, you can connect to the Microsoft OnLine system. If this is your
  586. first time using the system, you should carefully review the Microsoft
  587. OnLine documentation before accessing it.  %@NL@%
  588.  
  589.  
  590. %@2@%%@CR:C6A00030002 @%%@AB@%3.1  Languages and Other Tools%@AE@%%@EH@%%@NL@%
  591.  
  592. To produce a Windows 3.0 device driver and/or virtual device, you will need
  593. the following languages, tools, and software:  %@NL@%
  594.  
  595.  
  596.   ■   Microsoft Macro Assembler (MASM) version 5.10 (for all drivers)%@NL@%
  597.  
  598.   ■   Microsoft C Compiler version 6.0 (generally used for printer drivers)%@NL@%
  599.  
  600.   ■   Microsoft C Compiler version 5.1 (for those developers who are still
  601.       using the 5.1 version Compiler, or who want to binary compare files
  602.       they create with the Compiler with files provided in Windows 3.0).
  603.       Version 6.0 of the Microsoft C Compiler is the only version now
  604.       commercially available and so we recommend using it as soon as
  605.       possible. However, the drivers released in the Windows 3.0 retail
  606.       product were built with C 5.1.%@NL@%
  607.  
  608.   ■   The tools and files included with the %@AI@%Microsoft Windows Device
  609. %@AI@%      Development Kit%@AE@% and the %@AI@%Microsoft Windows Software Development Kit%@AE@%%@NL@%
  610.  
  611.   ■   The Windows 3.0 retail product and various Windows applications (for
  612.       debugging and testing the more complicated areas of your device)%@NL@%
  613.  
  614.  
  615.  
  616. %@2@%%@CR:C6A00030003 @%%@AB@%3.2  Recommended Hardware%@AE@%%@EH@%%@NL@%
  617.  
  618. The following is the minimum hardware configuration recommended for
  619. developing Windows 3.0 device drivers and/or virtual devices:  %@NL@%
  620.  
  621.  
  622.   ■   A 286- or 386-based computer (with a clock speed of 16 MHz or above)%@NL@%
  623.  
  624.   ■   At least 2 megabytes or more of memory (4 megabytes is recommended for
  625.       386 enhanced mode)%@NL@%
  626.  
  627.   ■   A fast hard disk for your compiler/linker%@NL@%
  628.  
  629.   ■   A fully configured EGA or VGA display card (or other device if you are
  630.       developing a display driver and virtual display device)%@NL@%
  631.  
  632.   ■   A debugging terminal connected to your serial port%@NL@%
  633.  
  634.   ■   A Microsoft Mouse or any other mouse compatible with Windows%@NL@%
  635.  
  636.   ■   A Windows-compatible printer%@NL@%
  637.  
  638.  
  639.  
  640. %@2@%%@CR:C6A00030004 @%%@AB@%3.3  Updating the CONFIG.SYS and AUTOEXEC.BAT Files%@AE@%%@EH@%%@NL@%
  641.  
  642. It is important to note that, during the installation of the Microsoft Macro
  643. Assembler and Microsoft C Compiler tools, you may need to make some changes
  644. to the CONFIG.SYS and AUTOEXEC.BAT files. Consult the reference manuals for
  645. these products for the recommended changes.  %@NL@%
  646.  
  647.  
  648. %@2@%%@CR:C6A00030005 @%%@AB@%3.4  Special Tools%@AE@%%@EH@%%@NL@%
  649.  
  650. You may also need the IMPLIB.EXE tool, which is provided with the Microsoft
  651. C Compiler, when building the drivers provided in this kit. This tool is %@AI@%not%@AE@%
  652. installed automatically when you install the Microsoft C Compiler version
  653. 5.1 software. You need to do this manually. However, C 6.0 %@AI@%does%@AE@% install it
  654. for you.  %@NL@%
  655.  
  656. You will find the LINK4.EXE utility on the Device Driver Samples and Tools
  657. disk # 8 (5.25 inch) or 14 (3.5 inch) under the \TOOLS directory. However,
  658. we recommend you modify the MAKE files to use the linker provided with your
  659. program language software. LINK4.EXE is only provided to help you build the
  660. sources with the MAKE files included in this kit. If you choose to use
  661. LINK4, you should copy this utility to the \TOOLS directory on your hard
  662. disk. This should correspond to the \TOOLS directory you may have set up
  663. with your programming language and/or with the SDK.  %@NL@%
  664.  
  665.  
  666. %@2@%%@CR:C6A00030006 @%%@AB@%3.5  Libraries%@AE@%%@EH@%%@NL@%
  667.  
  668. These files are located in the \LIB directory on the Device Driver Samples
  669. and Tools disk # 6 (5.25 inch) or 10 (3.5 inch). They consist of four
  670. libraries and a subdirectory that are required for writing particular types
  671. of device drivers and virtual devices. The other required libraries are
  672. provided in the SDK.  %@NL@%
  673.  
  674. %@TH:   7   403 02 24 52 @%
  675. Library                 Used for building
  676. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  677. SWINLIBC.LIB            All Windows device drivers
  678. USER.LIB                Printer drivers
  679. GDI.LIB                 Printer drivers
  680. KERNEL.LIB              Communications drivers
  681. C51 subdirectory        Drivers with the C5.1 Compiler only
  682. %@TE:   7   403 02 24 52 @%
  683.  
  684.  
  685. %@2@%%@CR:C6A00030007 @%%@AB@%3.6  INCLUDE Files%@AE@%%@EH@%%@NL@%
  686.  
  687. Most of these files are located in the \INCLUDE directory on the Device
  688. Driver Samples and Tools disk # 6 (5.25 inch) or 10 (3.5 inch). They are
  689. updated INCLUDE and header (.H) files for building Windows device drivers
  690. and virtual devices.  %@NL@%
  691.  
  692. If you are writing a virtual device, you also need to use some additional
  693. INCLUDE files. See the following section on virtual device INCLUDE files for
  694. more information on these files.  %@NL@%
  695.  
  696. You should add the appropriate Windows INCLUDE and header files to the
  697. Windows 3.0 \INCLUDE directory that you created during the SDK Install
  698. procedure. When writing assembly language drivers, you will need to
  699. incorporate at least the following INCLUDE (.INC) files:  %@NL@%
  700.  
  701. %@TH:   5   319 02 19 57 @%
  702. INCLUDE file       Used for building
  703. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  704. CMACROS.INC        All assembly-language drivers
  705. GDIDEFS.INC        Display and printer drivers
  706. WINDEFS.INC        Drivers affected by asynchronous interrupts
  707. %@TE:   5   319 02 19 57 @%
  708.  
  709. Some of these contain both C and ASM definitions and, therefore, can also be
  710. used in drivers written in C. (See Chapter 1, "Overview of Windows," in the
  711. %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@% for more detailed
  712. information on INCLUDE files.)  %@NL@%
  713.  
  714. The most important INCLUDE file is CMACROS.INC, which contains a set of
  715. assembly-language macros that provide a simplified interface to the function
  716. and segment conventions of high-level languages such as C and Pascal.  %@NL@%
  717.  
  718. GDIDEFS.INC enables you to follow the good practice of referring to symbolic
  719. constants and structures by their Windows standard names.  %@NL@%
  720.  
  721. WINDEFS.INC contains two very useful macros that are used to turn off
  722. hardware interrupts such as those from the floppy and hard disk controllers,
  723. math coprocessor, timer, keyboard, and mouse. Use the %@AB@%EnterCrit%@AE@% and
  724. %@AB@%LeaveCrit%@AE@% macros whenever you do not want an asynchronous interrupt to
  725. reenter an area of code that Windows is executing.  %@NL@%
  726.  
  727. The following is a list of some of the other required INCLUDE files.  %@NL@%
  728.  
  729. %@TH:   8   408 02 21 55 @%
  730. INCLUDE file         Used with
  731. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  732. WINDOWS.H            Printer drivers
  733. SPOOLS.H             Printer drivers
  734. PRINTER.H            Printer drivers
  735. GRABBER.INC          Display drivers
  736. WINNET.H             Network drivers (C Version)
  737. WNET.INC             Network drivers (Assembler version)
  738. %@TE:   8   408 02 21 55 @%
  739.  
  740.  
  741. %@2@%%@CR:C6A00030008 @%%@AB@%3.7  Special INCLUDE Files For Building Virtual Devices%@AE@%%@EH@%%@NL@%
  742.  
  743. To build the sample virtual devices correctly, you need to install all the
  744. files in the \INCLUDE directory from the Virtual Device Samples and Tools
  745. disks. The \INCLUDE directory contains .INC files used by the sample virtual
  746. device sources. This directory must be placed at the same directory level as
  747. the source directories, because they are referenced in the MAKE files in the
  748. following manner:  %@NL@%
  749.  
  750. %@STUB@%    ..\..\..\INCLUDE\%@AI@%SAMPLE.INC%@AE@%%@NL@%
  751.  
  752. This requirement, however, does not apply to INCLUDE files provided on the
  753. Device Driver Samples and Tools disks, or to those with the Windows 3.0 SDK
  754. or standard Microsoft language products. It only pertains to the virtual
  755. device sample sources provided in this kit.  %@NL@%
  756.  
  757. The \INCLUDE directory can be moved, though, if you modify the MAKE files
  758. appropriately.  %@NL@%
  759.  
  760.  
  761. %@2@%%@CR:C6A00030009 @%%@AB@%3.8  Special Tools For Building Virtual Devices%@AE@%%@EH@%%@NL@%
  762.  
  763. To build the sample virtual devices correctly, you need to install all the
  764. files in the \TOOLS directory on the Virtual Device Samples and Tools disks.
  765. The files in the \TOOLS directory should be put into the Windows 3.0 \TOOLS
  766. directory that was created by the SDK Install program.  %@NL@%
  767.  
  768. The \TOOLS directory contains utilities that are required for building
  769. virtual devices. However, these are not currently part of the standard
  770. Windows 3.0 SDK tool set and are not readily available with most Microsoft
  771. language products.  %@NL@%
  772.  
  773. This directory contains the following tools, each of which is necessary to
  774. build the virtual device sample sources with the MAKE files provided:  %@NL@%
  775.  
  776.  
  777.   ■   ADDHDR is a utility used to modify the headers of virtual devices. It
  778.       takes only one parameter, the name of the virtual device file, and
  779.       should be run as a standard part of every build procedure.%@NL@%
  780.  
  781.   ■   LINK386 is a special version of the Microsoft Segmented-Executable
  782.       Linker that is provided specifically for building virtual devices.
  783.       This version has been modified to understand 32-bit offsets.%@NL@%
  784.  
  785.   ■   MAPSYM32 is a version of the standard MAPSYM utility that is used to
  786.       convert map files produced by the linker into symbol files used by
  787.       some debuggers. This version has been modified to understand 32-bit
  788.       offsets.%@NL@%
  789.  
  790.   ■   MASM5 is a special version of the Microsoft Macro Assembler, version
  791.       5.10B, that supports the 32-bit address space required for virtual
  792.       devices. It has been named MASM5.EXE so it will not conflict with your
  793.       standard MASM executables. %@NL@%
  794.  
  795.  
  796.  
  797. %@2@%%@CR:C6A00030010 @%%@AB@%3.9  Summary List of Special Files%@AE@%%@EH@%%@NL@%
  798.  
  799. The following is a list of all the special files referred to in this chapter
  800. along with directions on where to find them on the 5.25 inch (or 3.5 inch)
  801. disks:  %@NL@%
  802.  
  803. %@TH:  28  1837 02 20 56 @%
  804. Special file        Where to find it
  805. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  806. IMPLIB.EXE          Microsoft C Compiler
  807. LINK4.EXE           DDK Device Driver S & T Disk # 8 (14) - \TOOLS
  808. SWINLIBC.LIB        DDK Device Driver S & T Disk # 6 (11) - \LIB
  809. USER.LIB            DDK Device Driver S & T Disk # 6 (11) - \LIB
  810. GDI.LIB             DDK Device Driver S & T Disk # 6 (11) - \LIB
  811. KERNEL.LIB          DDK Device Driver S & T Disk # 6 (11) - \LIB
  812. C51 subdirectory    DDK Device Driver S & T Disk # 6 (11) - \LIB
  813. CMACROS.INC         Microsoft Windows SDK
  814. GDIDEFS.INC         DDK Device Driver S & T Disk # 6 (10) - \INCLUDE
  815. WINDEFS.INC         DDK Device Driver S & T Disk # 6 (10) - \INCLUDE
  816. WINDOWS.H           Microsoft Windows SDK
  817. SPOOL.H             DDK Device Driver S & T Disk # 6 (10) - \INCLUDE
  818. PRINTER.H           DDK Device Driver S & T Disk # 6 (10) - \INCLUDE
  819. GRABBER.INC         DDK Device Driver S & T Disk # 6 (10) - \INCLUDE
  820. WINNET.H            DDK Device Driver S & T Disk # 6 (10) - \INCLUDE
  821. WNET.INC            DDK Device Driver S & T Disk # 5 (9) - \NET
  822. INT31.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDE
  823. VMM.INC             DDK Virtual Device S & T Disk # 1 (1) - \INCLUDE
  824. DEBUG.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDE
  825. VPICD.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDE
  826. SHELL.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDE
  827. VDD.INC             DDK Virtual Device S & T Disk # 1 (1) - \INCLUDE
  828. ADDHDR.EXE          DDK Virtual Device S & T Disk # 1 (1) - \TOOLS
  829. LINK386.EXE         DDK Virtual Device S & T Disk # 1 (1) - \TOOLS
  830. MAPSYM32.EXE        DDK Virtual Device S & T Disk # 1 (1) - \TOOLS
  831. MASM5.EXE           DDK Virtual Device S & T Disk # 1 (1) - \TOOLS
  832. %@TE:  28  1837 02 20 56 @%
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839. %@CR:C6A00040001 @%%@1@%%@AB@%Chapter 4  Recommended Development Process%@AE@%%@EH@%%@NL@%
  840. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  841.  
  842. This chapter provides an ordered outline of the steps you should follow when
  843. developing a new device driver or virtual device. It also directs you to the
  844. appropriate sections for the detailed information you will need to
  845. accomplish each step.  %@NL@%
  846.  
  847.  
  848. %@2@%%@CR:C6A00040002 @%%@AB@%4.1  Copy All Required Tools and Sources To Your Hard Disk%@AE@%%@EH@%%@NL@%
  849.  
  850. See Chapter 5, "System Setup and Tools Installation," in this guide to
  851. assist you in copying to your hard disk all the files that you will need to
  852. create your device driver and/or virtual device. It is important to remember
  853. that the files have been provided in a compressed format and need to be
  854. restored first to their original size before using them. See Section 5.2,
  855. "Expand the Compressed Files to Their Normal Size," for further information
  856. on how to do this.  %@NL@%
  857.  
  858.  
  859. %@2@%%@CR:C6A00040003 @%%@AB@%4.2  Familiarize Yourself With the Debugging Tools%@AE@%%@EH@%%@NL@%
  860.  
  861. There are several debugging tools provided with and documented in the SDK:
  862. CodeView(R) Windows (CVW), SYMDEB, and WDEB386. CodeView is used mainly for
  863. C debugging (e.g., printer drivers) and WDEB386 is used for assembly
  864. debugging (e.g., display drivers).  %@NL@%
  865.  
  866. If you have the appropriate hardware necessary for running CVW, you should
  867. try using this tool for your debugging. Otherwise, you should use the SYMDEB
  868. debugger whenever you are debugging in the real-mode memory model and the
  869. WDEB386 debugger when debugging in protected mode. Notice that, despite the
  870. name, the WDEB386 debugger can be used with either the 80286, 80386, or
  871. 80486 processors. See the SDK documentation for more information on using
  872. these debuggers.  %@NL@%
  873.  
  874.  
  875. %@2@%%@CR:C6A00040004 @%%@AB@%4.3  Build a Sample Driver%@AE@%%@EH@%%@NL@%
  876.  
  877. The best way to test your development environment is to build one of the
  878. sample device drivers included in this kit. To build one, follow these
  879. general steps. More detailed instructions are given in the remaining
  880. chapters. How to build a virtual device is described in greater detail in
  881. the %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@%.  %@NL@%
  882.  
  883.  
  884.   1.  Choose the disk containing the sample driver most similar to your
  885.       device. (See Chapter 6, "Windows 3.0 Device Driver Sources," and
  886.       Chapter 7, "Windows 3.0 Virtual Device Sources," in this guide for a
  887.       complete list of the sample drivers included with this kit.)%@NL@%
  888.  
  889.   2.  Copy from the floppy disk to your hard disk and then expand all the
  890.       files pertaining to that driver.  (See Chapter 5, "System Setup and
  891.       Tools Installation," for more information on these files.)%@NL@%
  892.  
  893.   3.  Follow the instructions in the MAKE file for that driver. Be sure to
  894.       read the important building information in the header for the MAKE
  895.       file before attempting to build the driver. %@NL@%
  896.  
  897.   4.  Modify the SYSTEM.INI file, which is located in the Windows directory,
  898.       to set the "currently selected" driver to your newly built driver so
  899.       that you can test it. To understand the structure and format of the
  900.       SYSTEM.INI file, read the SYSINI.TXT file.%@NL@%
  901.  
  902. %@STUB@%      The following is a debugging example using a VGA display driver as a
  903.       sample. To debug it, enter the following command:%@NL@%
  904.  
  905. %@AS@%      WDEB386 -S:<path>VGA.SYM[-S:other symbol maps] WIN/3 (or WIN/2 or
  906. %@AS@%      WIN/r)%@AE@%
  907.  
  908. %@STUB@%      All debugging output is then directed to COM1, with a 9600 baud rate,
  909.       no parity, 8 bits-per-character, and 1 stop bit. For further details
  910.       on debugging, see the %@AI@%Microsoft Windows Software Development Kit%@AE@%.%@NL@%
  911.  
  912. %@STUB@%      If you built a sample printer driver, use the Control Panel program
  913.       provided with the Windows 3.0 retail product to install your driver
  914.       for testing.%@NL@%
  915.  
  916.  
  917.  
  918. %@2@%%@CR:C6A00040005 @%%@AB@%4.4  Use the Test Applications%@AE@%%@EH@%%@NL@%
  919.  
  920. To help you in the testing of your display and printer drivers, we have
  921. included test applications and test files for use in printing from various
  922. Windows applications. These test applications can be found under the
  923. \TESTS\ITE directory, where ITE stands for Integrated Test Environment, and
  924. the test files are under the \TESTS\PRINT directory.  %@NL@%
  925.  
  926. See Section 6.2, "Display Driver Test Applications," and Section 6.4,
  927. "Printer Driver Test Applications," in this guide for more information on
  928. these applications and files. See Section 6.10, "Network Driver and HCT Test
  929. Applications," for more information on the hardware compatibility test and
  930. network test applications.  %@NL@%
  931.  
  932. The SDK also contains several test applications that are mentioned, where
  933. appropriate, later in this guide.  %@NL@%
  934.  
  935.  
  936. %@2@%%@CR:C6A00040006 @%%@AB@%4.5  Create a Distribution Disk%@AE@%%@EH@%%@NL@%
  937.  
  938. Once you are convinced that you have thoroughly tested your device driver or
  939. virtual device and have found it to be functioning properly, you should
  940. create the distribution disk with which the end-user will install your new
  941. device driver or virtual device. See Appendix C, "Creating Distribution
  942. Disks for Drivers," in the %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@%
  943. for the detailed steps involved.  %@NL@%
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950. %@CR:C6A00050001 @%%@1@%%@AB@%Chapter 5  System Setup and Tools Installation%@AE@%%@EH@%%@NL@%
  951. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  952.  
  953. Before installing the DDK software, you must first install the SDK software.
  954. The SDK %@AI@% Installation and Update Guide%@AE@% contains directions for installing
  955. the basic tools you will need for building device drivers. If you plan to
  956. debug and test your driver, you must also install the retail Microsoft
  957. Windows 3.0 software following the instructions in the %@AI@%Microsoft Windows
  958. %@AI@%Users Guide%@AE@%.  %@NL@%
  959.  
  960.  
  961. %@2@%%@CR:C6A00050002 @%%@AB@%5.1  Copy the Required Files From the Disks%@AE@%%@EH@%%@NL@%
  962.  
  963. Once you have installed the SDK tools, you should determine which sources
  964. you need a nd copy these to the appropriate directory on your hard disk. The
  965. software provided with the DDK is mainly comprised of compressed driver and
  966. virtual device sources. There is no formal installation process for these
  967. files. They can simply be copied from the floppy disks to your hard disk and
  968. then expanded. (See Chapter 6, "Windows 3.0 Device Driver Sources," and
  969. Chapter 7, "Windows 3.0 Virtual Device Sources," in this guide for detailed
  970. descriptions of the sources provided in the DDK.)  %@NL@%
  971.  
  972. Many of the driver source directories are organized into source trees
  973. containing files and subdirectories. They also contain all the software
  974. modules and MAKE and batch files necessary to build the drivers. We
  975. recommend you use the MS-DOS %@AB@%XCOPY%@AE@% command in most cases to ensure you are
  976. copying the directory images just as they are on the disks. Unlike the %@AB@%COPY%@AE@%
  977. command, the %@AB@%XCOPY%@AE@% command can copy all the files contained in the entire
  978. hierarchical file structure of the source disk to the destination disk.  %@NL@%
  979.  
  980. The following is an example showing how to use the %@AB@%XCOPY%@AE@% command and several
  981. of its optional switches:  %@NL@%
  982.  
  983. %@AS@%  XCOPY A:\DISPLAY\1PLANE C:\DISPLAY\1PLANE /s /e /v%@AE@%
  984.  
  985. The %@AB@%/s%@AE@% switch tells %@AB@%XCOPY%@AE@% to copy all the subdirectories. The %@AB@%/e%@AE@% switch
  986. ensures that empty directories get copied. The %@AB@%/v%@AE@% switch is optional but
  987. recommended since it enables you to verify that the files are copied
  988. correctly.  %@NL@%
  989.  
  990. It is important to maintain the directory structure for the provided MAKE
  991. and batch files to work properly. If you change the organization of the
  992. files on your hard disk, be sure to make the appropriate changes to the MAKE
  993. or batch file for building the driver. Notice that a source directory tree
  994. may span across several of the DDK disks. Therefore, be sure to review all
  995. the disks to ensure you have copied all the appropriate files.  %@NL@%
  996.  
  997.  
  998. %@2@%%@CR:C6A00050003 @%%@AB@%5.2  Expand the Compressed Files to Their Normal Size%@AE@%%@EH@%%@NL@%
  999.  
  1000. Notice that the files on the disks in the DDK are provided in a compressed
  1001. format to conserve disk space. However, they cannot be used in that form.
  1002. After the %@AB@%XCOPY%@AE@% command has been used to copy all the disks to your hard
  1003. disk, you must expand either all the compressed files or just the files you
  1004. need to create the device driver or virtual device you plan to develop.  %@NL@%
  1005.  
  1006. To convert all the files to their normal size, we have included, in the root
  1007. directory of the Device Driver Samples and Tools disk # 1 (1), the following
  1008. four files that need to be copied to your hard disk:  %@NL@%
  1009.  
  1010.  
  1011.   ■   TREEEX2.BAT%@NL@%
  1012.  
  1013.   ■   TREEEX3.BAT%@NL@%
  1014.  
  1015.   ■   TREEEXP.BAT%@NL@%
  1016.  
  1017.   ■   WALK.EXE%@NL@%
  1018.  
  1019.  
  1020. After you have copied from the disks the compressed directory that you need,
  1021. move to that directory and type the following:  %@NL@%
  1022.  
  1023. %@AS@%  TREEEXP%@AE@%
  1024.  
  1025. This batch file will expand to their normal size all the files in the
  1026. current directory and any of its subdirectories.  %@NL@%
  1027.  
  1028.  
  1029. %@2@%%@CR:C6A00050004 @%%@AB@%5.3  Other Considerations%@AE@%%@EH@%%@NL@%
  1030.  
  1031. If you have directories for the 2.0 version tools on your hard disk, be sure
  1032. to set your MS-DOS %@AB@%PATH%@AE@% and %@AB@%SET%@AE@% commands to include, instead of or before
  1033. the 2.0 directories, all the 3.0 tools, INCLUDE, and library directories.  %@NL@%
  1034.  
  1035. Also, you need to determine whether you need the device driver sources, the
  1036. virtual device sources, or both. For example, if you are writing a printer
  1037. driver, you do not need to write a virtual device because access to these
  1038. devices is already virtualized at the printer port level in the Virtual
  1039. Printer Device. However, if you are writing a display driver you probably
  1040. will need them. If your device can be shared among several virtual machines
  1041. (VMs) while running under 386 enhanced mode (e.g., if DOS standard
  1042. applications can call your device, as well as Windows), then you should
  1043. provide a virtual device. Some examples of devices for which we will provide
  1044. virtual device support in Windows include the following:  %@NL@%
  1045.  
  1046.  
  1047.   ■   Displays%@NL@%
  1048.  
  1049.   ■   Printer or parallel ports%@NL@%
  1050.  
  1051.   ■   Serial ports%@NL@%
  1052.  
  1053.   ■   Keyboards%@NL@%
  1054.  
  1055.   ■   Pointing devices%@NL@%
  1056.  
  1057.   ■   Network API (e.g., NetBIOS)%@NL@%
  1058.  
  1059.   ■   Special hard disks%@NL@%
  1060.  
  1061.   ■   Math co-processors%@NL@%
  1062.  
  1063.  
  1064.  
  1065. %@2@%%@CR:C6A00050005 @%%@AB@%5.4  Checking Your Tools Setup%@AE@%%@EH@%%@NL@%
  1066.  
  1067. To check if you have installed the tools correctly, enter (one at a time)
  1068. the following commands:  %@NL@%
  1069.  
  1070. %@STUB@%    %@AB@%MAKE%@AE@%%@NL@%
  1071.  
  1072. %@STUB@%    %@AB@%LINK%@AE@%%@NL@%
  1073.  
  1074. %@STUB@%    %@AB@%LINK386%@AE@%%@NL@%
  1075.  
  1076. %@STUB@%    %@AB@%RC%@AE@%%@NL@%
  1077.  
  1078. %@STUB@%    %@AB@%MAPSYM%@AE@%%@NL@%
  1079.  
  1080. %@STUB@%    %@AB@%MASM%@AE@%%@NL@%
  1081.  
  1082. %@STUB@%    %@AB@%MASM5%@AE@%%@NL@%
  1083.  
  1084. %@STUB@%    %@AB@%CL%@AE@%%@NL@%
  1085.  
  1086. %@STUB@%    %@AB@%ADDHDR%@AE@%%@NL@%
  1087.  
  1088. After you enter each command, the appropriate version banner for that tool
  1089. should appear on the screen. Ensure that you are using the correct version
  1090. per the following list:  %@NL@%
  1091.  
  1092. %@STUB@%    %@AB@%MAKE %@AE@%(4.07)%@NL@%
  1093.  
  1094. %@STUB@%    %@AB@%LINK%@AE@% (5.10 for C 6.0 or 5.01.21 for C 5.1)%@NL@%
  1095.  
  1096. %@STUB@%    %@AB@%LINK386%@AE@% (1.00.058)%@NL@%
  1097.  
  1098. %@STUB@%    %@AB@%RC%@AE@% (3.0)%@NL@%
  1099.  
  1100. %@STUB@%    %@AB@%MAPSYM%@AE@% (4.11)%@NL@%
  1101.  
  1102. %@STUB@%    %@AB@%MASM%@AE@% (5.10)%@NL@%
  1103.  
  1104. %@STUB@%    %@AB@%MASM5 %@AE@%(5.10B)%@NL@%
  1105.  
  1106. %@STUB@%    %@AB@%CL %@AE@%(6.0 or 5.1)%@NL@%
  1107.  
  1108. %@STUB@%    %@AB@%ADDHDR %@AE@%(1.01)%@NL@%
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115. %@CR:C6A00060001 @%%@1@%%@AB@%Chapter 6  Windows 3.0 Device Driver Sources%@AE@%%@EH@%%@NL@%
  1116. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1117.  
  1118. The following sections contain detailed descriptions of the Microsoft
  1119. Windows 3.0 device driver sources provided in the DDK. The information
  1120. includes where you can find the code on the disks, the procedure for
  1121. building the driver, and the features demonstrated by the code.  %@NL@%
  1122.  
  1123. The sources in this DDK are provided for your development use. You should
  1124. use the sources provided as a code base or as examples of how you should
  1125. structure your driver.  %@NL@%
  1126.  
  1127. The sources are set up in subdirectories on the enclosed disks. You should
  1128. use the MS-DOS %@AB@%COPY%@AE@% or %@AB@%XCOPY%@AE@% command to copy all the files and related
  1129. subdirectories to your hard disk. It is important that you maintain the
  1130. structure as provided on the disks to ensure that the accompanying MAKE and
  1131. batch files work properly. Also, be sure to expand the compressed files to
  1132. their normal size after copying them to your hard disk. See Section 5.2,
  1133. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1134. this.  %@NL@%
  1135.  
  1136. The following table provides a summary of all the source files mentioned in
  1137. this chapter and their locations on the 5.25 inch (or 3.5 inch) DDK Device
  1138. Driver Samples and Tools Disks:  %@NL@%
  1139.  
  1140. %@TH:  79  2556 02 27 12 37 @%
  1141. Sources for                On disk #   Directory name
  1142. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1143. 1-plane displays           1 (2) and   \DISPLAY\1PLANE
  1144.                            2 (3/4)     
  1145.  
  1146. 4-plane displays           1 (1/2)     \DISPLAY\4PLANE
  1147.  
  1148. 8-plane displays           2 (4) and   \DISPLAY\8PLANE
  1149.                            3 (5)       
  1150.  
  1151. CGA grabbers               8 (14)      \GRABBERS\CGAHERC\CGA
  1152.  
  1153. Compaq Plasma              8 (14)      \GRABBERS\CGAHERC\CGA
  1154. grabbers                               
  1155.  
  1156. Hercules grabbers          8 (14)      \GRABBERS\CGAHERC\HERCULES
  1157.  
  1158. EGA color grabbers         8 (14)      \GRABBERS\EGA\EGACOLOR
  1159.  
  1160. EGA mono grabbers          8 (14)      \GRABBERS\EGA\EGAMONO
  1161.  
  1162. VGA color grabbers         8 (14)      \GRABBERS\VGA\VGACOLOR
  1163.  
  1164. 8514/a grabbers            8 (14)      \GRABBERS\VGA\VGACOLOR
  1165.  
  1166. VGA mono grabbers          8 (14)      \GRABBERS\VGA\VGAMONO
  1167.  
  1168. Proportional system font   7 (13)      \FONTS\SYSTEM
  1169.  
  1170. Fixed-pitch system font    7 (13)      \FONTS\FIXED
  1171.  
  1172. Display driver test app    7 (13)      \TESTS\ITE\BIN\DISPTEST.EXE
  1173.  
  1174. Display driver test app    6 (11)      \TESTS\DTA\DTA.EXE
  1175.  
  1176. Display driver test docs   7 (13)      \TESTS\ITE\DOCS\DISPTEST.TXT
  1177.  
  1178. Display driver test docs   6 (11)      \TESTS\DTA\DTA.DOC
  1179.  
  1180. PCL/HP LaserJet printers   3 (5)       \PRINTERS\HPPCL
  1181.  
  1182. Printer Font Installer     4 (7)       \PRINTERS\FINSTALL
  1183.  
  1184. PFM Editor                 8 (13)      \TOOLS\PFMEDIT.EXE
  1185.  
  1186. PostScript printers        4 (7)       \PRINTERS\PSCRIPT
  1187.  
  1188. MKPRN tool                 8 (13)      \TOOLS\MKPRN.EXE
  1189.  
  1190. Epson printers             5 (8)       \PRINTERS\RASTER\EPSON
  1191.  
  1192. IBM Color Printer          5 (9)       \PRINTERS\RASTER\COLOR\IBMCOLOR
  1193.  
  1194. Printer driver test app    7 (12)      \TESTS\ITE\BIN\PRNTTEST.EXE
  1195.  
  1196. Printer driver test docs   7 (12)      \TESTS\ITE\DOCS\PRNTTEST.TXT
  1197.  
  1198. Keyboard drivers           5 (13)      \KEYBOARD
  1199.  
  1200. Mouse drivers              6 (10)      \MOUSE
  1201.  
  1202. Communications drivers     6 (10)      \COMM
  1203.  
  1204. Sound drivers              6 (10)      \SOUND
  1205.  
  1206. MS-Net network driver      5 (9)       \NET
  1207.  
  1208. Network driver test app    7 (12)      \TESTS\NETTEST\BIN\NETTEST.EXE
  1209.  
  1210. Network driver test docs   7 (12)      \TESTS\NETTEST\README.TXT
  1211.  
  1212. Hardware compatibility     7 (13)      \TESTS\HCT
  1213. test applications                      
  1214.  
  1215. Hardware compatibility     7 (13)      \TESTS\HCT\README.DOC
  1216. test docs                              
  1217.  
  1218. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1219.  
  1220. %@TE:  79  2556 02 27 12 37 @%
  1221.  
  1222.  
  1223. %@2@%%@CR:C6A00060002 @%%@AB@%6.1  Display Driver Sources%@AE@%%@EH@%%@NL@%
  1224.  
  1225. We are providing 1-, 4-, and 8-plane display driver sources in the DDK on
  1226. the Device Driver Samples and Tools disks. See the table at the beginning of
  1227. this chapter for their exact locations.  %@NL@%
  1228.  
  1229. While many of the display drivers use common code, several drivers compile
  1230. with different switches. Therefore, if you build one display driver and,
  1231. then, want to build a different one, you must delete all the .OBJ files in
  1232. the following directories:  %@NL@%
  1233.  
  1234. %@TH:   7   413 02 31 45 @%
  1235. 1-plane drivers                4-plane drivers
  1236. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1237. \1PLANE                        \4PLANE
  1238. \1PLANE\BW                     \4PLANE\COLOR
  1239. \1PLANE\BW\CGAHERC             \4PLANE\COLOR\EGA
  1240. \1PLANE\BW\EGA
  1241. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1242. %@TE:   7   413 02 31 45 @%
  1243.  
  1244.  
  1245. %@3@%%@CR:C6A00060003 @%%@AB@%6.1.1  1-Plane Drivers: CGA, EGA Monochrome, EGA High Resolution B&W,%@EH@%
  1246. %@AB@%Hercules, Plasma, and MCGA%@AI@%%@AE@%%@AE@%%@NL@%
  1247.  
  1248. All the above-mentioned drivers are 1-plane drivers. These drivers have been
  1249. modified to run bimodal (in real and protected memory modes), support
  1250. device-independent bitmaps (DIBs), and support greater than (>) 64K fonts.
  1251. They are located on the Device Driver Samples and Tools disks # 1 (2) and 2
  1252. (3/4) under the \DISPLAY\1PLANE directory.  %@NL@%
  1253.  
  1254. These drivers share common code in many areas. Therefore, you need to copy
  1255. all the files in the directory structure to your hard disk. We suggest you
  1256. use the MS-DOS %@AB@%XCOPY%@AE@% command to do this. Also, be sure to expand the
  1257. compressed files to their normal size after copying them to your hard disk.
  1258. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1259. details on how to do this.  %@NL@%
  1260.  
  1261. You need to change to the appropriate subdirectory for the driver you want
  1262. to build. Each driver directory has a MAKEIT.BAT batch file to build the
  1263. driver. You will find a batch file for each driver under the following
  1264. pathnames:  %@NL@%
  1265.  
  1266. %@TH:  15   664 02 34 44 @%
  1267. Driver                            Location
  1268. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1269. CGA                               \DISPLAY\1PLANE\BW\CGAHERC\CGA\ AKEIT.BAT
  1270.  
  1271. Compaq Plasma                     \DISPLAY\1PLANE\BW\CGAHERC\COMPAQ
  1272.                                   \MAKEIT.BAT
  1273.  
  1274. Hercules mono                     \DISPLAY\1PLANE\BW\CGAHERC\HERC\MAKEIT.BAT
  1275.  
  1276. EGA hi res B&W                    \DISPLAY\1PLANE\BW\EGA\EGAHIBW\MAKEIT.BAT
  1277.  
  1278. EGA mono                          \DISPLAY\1PLANE\BW\EGA\EGAMONO\MAKEIT.BAT
  1279.  
  1280. MCGA (VGAmono)                    \DISPLAY\1PLANE\BW\EGA\MCGA\MAKEIT.BAT
  1281.  
  1282. %@TE:  15   664 02 34 44 @%
  1283.  
  1284. If your 1-plane display device is based on the CGA, EGA, or Hercules
  1285. standard, you should base your driver code on one of these drivers.
  1286. Otherwise, these sources can provide you with the sample code necessary for
  1287. you to design and plan for a new 1-plane driver.  %@NL@%
  1288.  
  1289.  
  1290. %@3@%%@CR:C6A00060004 @%%@AB@%6.1.2  4-Plane Drivers: EGA and VGA%@AE@%%@EH@%%@NL@%
  1291.  
  1292. Both the EGA and VGA driver sources use all 4 planes to support 16 colors.
  1293. These drivers have been modified to run bimodal (in real and protected
  1294. memory modes), support device-independent bitmaps (DIBs), and support
  1295. greater than (>) 64K fonts. They are located on the Device Driver Samples
  1296. and Tools disk # 1 (1/2) under the \DISPLAY\4PLANE directory.  %@NL@%
  1297.  
  1298. You may also find samples of IFDEF palette management code in these sources.
  1299. However, we recommend that you do not follow these examples. See the
  1300. following section on 8-plane VGA drivers for more complete information on
  1301. sample sources with palette management support.  %@NL@%
  1302.  
  1303. These drivers share common code in many areas. Therefore, you need to copy
  1304. all the files in the directory structure to your hard disk. We suggest you
  1305. use the MS-DOS %@AB@%XCOPY%@AE@% command to do this. Also, be sure to expand the
  1306. compressed files to their normal size after copying them to your hard disk.
  1307. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1308. details on how to do this.  %@NL@%
  1309.  
  1310. You need to change to the appropriate subdirectory for either the VGA or EGA
  1311. driver and execute the MAKEIT.BAT batch file to build the driver. You will
  1312. find a batch file for each driver under the following pathnames:  %@NL@%
  1313.  
  1314. %@TH:   4   282 02 21 55 @%
  1315. Driver               Location
  1316. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1317. EGA hi res color     \DISPLAY\4PLANE\COLOR\EGA\EGAHIRES\MAKEIT.BAT
  1318. VGA                  \DISPLAY\4PLANE\COLOR\EGA\VGA\MAKEIT.BAT
  1319. %@TE:   4   282 02 21 55 @%
  1320.  
  1321. If your 4-plane display device is based on either the EGA or VGA standard,
  1322. you should base your driver code on the appropriate driver. Otherwise, these
  1323. sources can provide you with the sample code necessary for you to design and
  1324. plan for a new 4-plane driver.  %@NL@%
  1325.  
  1326.  
  1327. %@3@%%@CR:C6A00060005 @%%@AB@%6.1.3  8-Plane Drivers: Video Seven VGA and 8514/a%@AI@%%@AE@%%@AE@%%@EH@%%@NL@%
  1328.  
  1329. We have provided you with sources for the Video Seven VGA and the 8514/a
  1330. drivers. These drivers use all 8 planes available on the adapter for 256
  1331. color support. The code provides a good example of the use of color-palette
  1332. management and device-independent bitmaps (DIBs). These drivers have been
  1333. adapted to run bimodal and support >64K fonts. Both driver sources can be
  1334. used as examples of how a packed-pixel driver is implemented under Windows.
  1335. %@NL@%
  1336.  
  1337. To demonstrate the use of DIBs and color-palette management in these
  1338. drivers, you can run the sample application, SHOWDIB, provided in the SDK.  %@NL@%
  1339.  
  1340. You will find these sources on the Device Driver Samples and Tools disks # 2
  1341. (4) and 3 (5) under the \DISPLAY\8PLANE (\V7 or \8514) directory. You need
  1342. to copy all the files in the appropriate directory structure to your hard
  1343. disk. These two drivers do %@AI@%not%@AE@% share any common code, so you must choose one
  1344. or both depending on your needs. Use the MS-DOS %@AB@%XCOPY%@AE@% command to do this.
  1345. Also, be sure to expand the compressed files to their normal size after
  1346. copying them to your hard disk. See Section 5.2, "Expand the Compressed
  1347. Files to Their Normal Size," for details on how to do this.  %@NL@%
  1348.  
  1349. Notice that the \8PLANE\V7 directory contains an empty subdirectory called
  1350. \DEBUG. The \8PLANE\8514 directory also has an empty \OBJ subdirectory. You
  1351. must have these subdirectories available when you build the driver,
  1352. otherwise the MAKE files will fail.  %@NL@%
  1353.  
  1354. You need to change to the appropriate subdirectory for the driver you want
  1355. to build. You will find a batch file for the Video Seven VGA driver under
  1356. the following pathname:  %@NL@%
  1357.  
  1358. %@STUB@%    \DISPLAY\8PLANE\V7\MKP.BAT%@NL@%
  1359.  
  1360. This will build the V7VGA.DRV file into the \DEBUG subdirectory.  %@NL@%
  1361.  
  1362. For the 8514/a driver, change to the following subdirectory
  1363. (\DISPLAY\8PLANE\8514\SOURCE) and then type:  %@NL@%
  1364.  
  1365. %@STUB@%    MAKE DRIVER%@NL@%
  1366.  
  1367. This will build the 8514.DRV file into the \OBJ subdirectory.  %@NL@%
  1368.  
  1369.  
  1370. %@3@%%@CR:C6A00060006 @%%@AB@%6.1.4  Windows Real and Standard Mode Grabbers%@AE@%%@EH@%%@NL@%
  1371.  
  1372. The Windows real and standard mode grabbers are on the Device Driver Samples
  1373. and Tools disk # 8 (14) under the \GRABBERS directory. Since much of the
  1374. grabber code for different displays is common, you should copy the \GRABBERS
  1375. sub-directory in its entirety to your hard disk. Also, be sure to expand the
  1376. compressed files to their normal size after copying them to your hard disk.
  1377. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1378. details on how to do this.  %@NL@%
  1379.  
  1380. The individual grabbers are in the following directories:  %@NL@%
  1381.  
  1382. %@TH:   8   481 02 30 46 @%
  1383. Grabber                       Location
  1384. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1385. CGA and Compaq Plasma         \GRABBERS\CGAHERC\CGA
  1386. Hercules                      \GRABBERS\CGAHERC\HERCULES
  1387. EGA color                     \GRABBERS\EGA\EGACOLOR
  1388. EGA mono                      \GRABBERS\EGA\EGAMONO
  1389. VGA color and 8514/a          \GRABBERS\VGA\VGACOLOR
  1390. VGA mono (MCGA)               \GRABBERS\VGA\VGAMONO
  1391. %@TE:   8   481 02 30 46 @%
  1392.  
  1393. After changing to the appropriate subdirectory, use the MAKE files provided
  1394. in each of these directories to build the grabber by typing:  %@NL@%
  1395.  
  1396. %@STUB@%    MAKE %@AI@%grabbername%@AE@%%@NL@%
  1397.  
  1398.  
  1399. %@3@%%@CR:C6A00060007 @%%@AB@%6.1.5  System Font Sources%@AE@%%@EH@%%@NL@%
  1400.  
  1401. We have provided both the new Windows 3.0 proportional system font and the
  1402. old Windows 2.0 fixed-pitch system font. If your display driver supports
  1403. resolutions other than the display resolutions provided in Windows, you may
  1404. need to modify the system fonts for your display.  %@NL@%
  1405.  
  1406. You will need to copy the \FONTS directory to your hard disk in its
  1407. entirety. Use the MS-DOS %@AB@%XCOPY%@AE@% command to do this. You will find this
  1408. directory on the Device Driver Samples and Tools disk # 7 (13). Also, be
  1409. sure to expand the compressed files to their normal size after copying them
  1410. to your hard disk. See Section 5.2, "Expand the Compressed Files to Their
  1411. Normal Size," for details on how to do this.  %@NL@%
  1412.  
  1413. The Windows 3.0 proportional system fonts are hand tuned for the screen and
  1414. match the Adobe font widths for their Helv font. If you need to adapt the
  1415. system font for a display with a different horizontal resolution than the
  1416. ones supported by these fonts, you will need to adjust the font widths
  1417. accordingly. This ensures that the character will do the best "copy fit" of
  1418. the printed character with those on the screen. To modify these (.FNT) files
  1419. before building the .FON file, use the Font Editor tool provided with the
  1420. SDK.  %@NL@%
  1421.  
  1422. Before you build any fonts, you must make the FONTS.OBJ file, which you can
  1423. do by running the following once from the \FONTS directory:  %@NL@%
  1424.  
  1425. %@STUB@%    MASM FONTS;%@NL@%
  1426.  
  1427. You can easily build the proportional system font files by executing the
  1428. MAKE file from the \FONTS\SYSTEM directory:  %@NL@%
  1429.  
  1430. %@STUB@%    MAKE SYSTEM%@NL@%
  1431.  
  1432. The font filenames for the new proportional system fonts are as follows:  %@NL@%
  1433.  
  1434. %@TH:   6   351 02 18 58 @%
  1435. Filename          Resolution
  1436. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1437. CGASYS.FON        (640 x 200) CGA 
  1438. EGASYS.FON        (640 x 350) EGA high res
  1439. VGASYS.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1440. 8514SYS.FON       (1024 x 768) 8514/a (square pixels, 120 dpi)
  1441. %@TE:   6   351 02 18 58 @%
  1442.  
  1443. In addition to the new Windows 3.0 proportional system font, the Windows 2.0
  1444. fixed-pitch system font is necessary for older Windows applications running
  1445. under Windows 3.0. All Windows applications that are not "marked" to run
  1446. with the new proportional font, or that were not developed as a Windows 3.0
  1447. application, will be given the fixed-pitch font for  displaying text in
  1448. dialog and message boxes and in the client area.  %@NL@%
  1449.  
  1450. Since Windows 3.0 supports both of these files, it may be necessary for you
  1451. to also modify the appropriate fixed-pitch system font.  %@NL@%
  1452.  
  1453. You will find these fonts, as well as the terminal (OEM) fixed-pitch fonts,
  1454. in the \FONTS\FIXED directory. Execute from this directory the MAKE file
  1455. called FIXED by running:  %@NL@%
  1456.  
  1457. %@STUB@%    MAKE FIXED%@NL@%
  1458.  
  1459. The font filenames for the Windows 2.0 fixed-pitch system and terminal (OEM)
  1460. fonts are as follows:  %@NL@%
  1461.  
  1462. %@TH:  15   840 02 18 58 @%
  1463. Filename          Resolution
  1464. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1465. CGAFIX.FON        (640 x 200) CGA 
  1466. CGAOEM.FON        (640 x 200) CGA 
  1467. EGAFIX.FON        (640 x 350) EGA high res
  1468. EGAOEM.FON        (640 x 350) EGA high res
  1469. VGAFIX.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1470. VGAOEM.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1471. VGA850.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1472. VGA860.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1473. VGA861.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1474. VGA863.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1475. VGA865.FON        (640 x 480) VGA (square pixels, 96 dpi)
  1476. 8514FIX.FON       (1024 x 768) 8514/a (square pixels, 120 dpi)
  1477. 8515OEM.FON       (1024 x 768) 8514/a (square pixels, 120 dpi)
  1478. %@TE:  15   840 02 18 58 @%
  1479.  
  1480. If you want to build both the system proportional and fixed fonts at the
  1481. same time, you can run the MAKE file called FONTS from the \FONTS directory.
  1482. %@NL@%
  1483.  
  1484.  
  1485. %@2@%%@CR:C6A00060008 @%%@AB@%6.2  Display Driver Test Applications%@AE@%%@EH@%%@NL@%
  1486.  
  1487. The DDK now contains a display driver test application. You will find the
  1488. complete documentation, program executable, and source to this test under
  1489. the \TESTS\ITE directory on the Device Driver Samples and Tools disk # 7
  1490. (13). The program is called DISPTEST.EXE and is in the \TESTS\ITE\BIN
  1491. subdirectory. The documentation for running the program is in
  1492. \TESTS\ITE\DOCS\DISPTEST.TXT.  %@NL@%
  1493.  
  1494. The sources have been provided to aid in your debugging should you find a
  1495. problem while running the display test program. If you need to build this
  1496. program for some reason, you should follow the instructions in the
  1497. README.TXT file under the \TESTS\ITE directory.  %@NL@%
  1498.  
  1499. A more comprehensive display driver test application called DTA.EXE is also
  1500. included and can be found under \TESTS\DTA on the Device Driver Samples and
  1501. Tools disk # 6 (11). The documentation for running it is in
  1502. \TESTS\DTA\DTA.DOC.  %@NL@%
  1503.  
  1504.  
  1505. %@2@%%@CR:C6A00060009 @%%@AB@%6.3  Printer Driver Sources%@AE@%%@EH@%%@NL@%
  1506.  
  1507. We are providing driver sources for our PCL/HP LaserJet and PostScript
  1508. printer drivers. In addition, sample sources for dot-matrix black/white and
  1509. color raster printers are also included. All of these sample sources provide
  1510. full support for Windows 3.0 features.  %@NL@%
  1511.  
  1512. After copying all the appropriate files to your hard disk with the MS-DOS
  1513. %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command, be sure to expand the compressed files to their
  1514. normal size. See Section 5.2, "Expand the Compressed Files to Their Normal
  1515. Size," for details on how to do this.  %@NL@%
  1516.  
  1517.  
  1518. %@3@%%@CR:C6A00060010 @%%@AB@%6.3.1  PCL/HP LaserJet Printer Driver%@AI@%%@AE@%%@AE@%%@EH@%%@NL@%
  1519.  
  1520. The PCL/HP LaserJet printer driver sources are being provided as examples
  1521. for using the new device initialization APIs, the Printer Font Installer,
  1522. the new Windows 3.0 controls in the printer dialog box, and the new Help
  1523. Manager. The two new APIs (%@AB@%ExtDeviceMode()%@AE@% and %@AB@%DeviceCapabilities()%@AE@%) for
  1524. device initialization are documented in the DDK in Chapter 5, "Printer
  1525. Drivers," of the %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@%.  %@NL@%
  1526.  
  1527. The device-mode dialog box should be used as an example for designing a
  1528. driver dialog box interface only for Windows 3.0. The design should follow
  1529. the guidelines described in the %@AI@%Systems Application Architecture, Common
  1530. %@AI@%User Access: Advanced Interface Design Guide%@AE@%. If this dialog box offers the
  1531. user any options, some mechanism should be included to enable the user to
  1532. access online help. How to use the Windows 3.0 Help Engine is described in
  1533. the %@AI@%Microsoft Windows Software Development Kit%@AE@%.  %@NL@%
  1534.  
  1535. The PCL/HP LaserJet core driver sources are on the Device Driver Samples and
  1536. Tools disk # 3 (5) under the \PRINTERS\HPPCL directory. The \HPPCL directory
  1537. contains subdirectories necessary for building the driver. You can build the
  1538. driver by running the MAKEIT.BAT batch file from the \HPPCL directory.  %@NL@%
  1539.  
  1540. Included in the DDK documentation set is the %@AI@%Microsoft Windows Printers and
  1541. %@AI@%Fonts Kit%@AE@%. You should review this document for information on font support
  1542. under the PCL/HP LaserJet printer driver and for new features that have been
  1543. incorporated into this version of the driver. For example, the Soft Font
  1544. Installer has been removed from the core driver and placed into a separate
  1545. dynamic-link library (DLL). It will install font information for both soft
  1546. and cartridge fonts. A new source tree was created for the installer (now
  1547. called the Printer Font Installer).  %@NL@%
  1548.  
  1549. The Printer Font Installer source is on the Device Driver Samples and Tools
  1550. disk # 4 (7) under the \PRINTERS\FINSTALL directory. You can build the font
  1551. installer by running the MAKEIT.BAT file from the \FINSTALL directory. This
  1552. module is called by selecting the "Fonts..." button in the HPPCL driver
  1553. dialog box.  %@NL@%
  1554.  
  1555. The Printer Font Metrics (PFM) Editor (PFMEDIT.EXE), also documented in the
  1556. %@AI@%Microsoft Windows Printers and Fonts Kit%@AE@%, is provided on the Device Driver
  1557. Samples and Tools disk # 8 (13) under the \TOOLS directory.  %@NL@%
  1558.  
  1559.  
  1560. %@3@%%@CR:C6A00060011 @%%@AB@%6.3.2  PostScript Printer Driver%@AE@%%@EH@%%@NL@%
  1561.  
  1562. The PostScript printer driver is also a good example of how to use the new
  1563. device initialization APIs (%@AB@%ExtDeviceMode()%@AE@% and %@AB@%DeviceCapabilities()%@AE@%), the
  1564. new Windows 3.0 controls, and the Help Manager. It can also provide an
  1565. example of Windows support for vector devices such as plotters.  %@NL@%
  1566.  
  1567. Notice that the device-mode interface between the PCL/HP LaserJet driver and
  1568. the PostScript driver are consistent wherever possible. These sources also
  1569. serve as an example of the new and updated escapes documented in Chapter 11,
  1570. "Device Driver Escapes," of the %@AI@%Microsoft Windows Device Driver Adaptation
  1571. %@AI@%Guide%@AE@%.  %@NL@%
  1572.  
  1573. This version of the driver provides RGB color PostScript support. Percent
  1574. scaling has also been added to the driver. The user can specify the scale of
  1575. the output to be printed in the printable area of the page.  %@NL@%
  1576.  
  1577. Device-independent color bitmaps (DIBs) are supported directly in the
  1578. driver. This is a good example of how you can support this Windows 3.0
  1579. feature on color printer devices. For more information on DIBs, see Chapter
  1580. 3, "Display Drivers: New Features," in the %@AI@%Microsoft Windows Device Driver
  1581. %@AI@%Adaptation Guide.%@AE@%  %@NL@%
  1582.  
  1583. The option to change the Graphics Resolution has been removed from the
  1584. device-mode dialog interface. Under Windows 3.0, %@AB@%StretchBlt()%@AE@% is implemented
  1585. at the driver level. Therefore, the need to change the device resolution to
  1586. speed up bitmap output is no longer needed. See Chapter 10, "Common
  1587. Functions," in the %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@% for more
  1588. information on the %@AB@%StretchBlt()%@AE@% enhancements. An example of its use is in
  1589. the PostScript driver source file STRCHBLT.C.  %@NL@%
  1590.  
  1591. Another new GDI device driver function for scaling DIBs is the
  1592. %@AB@%StretchDIBits()%@AE@% function. See Chapter 3, "Display Drivers: New Features,"
  1593. for more information on this and other DIBs functions. An example of its use
  1594. is in the PostScript driver source file DIBTODEV.C.  %@NL@%
  1595.  
  1596. The driver sources are on the Device Driver Samples and Tools disk # 8 (13)
  1597. under the \PRINTERS\PSCRIPT directory. A batch file is provided to build the
  1598. driver called MAKEPS33.BAT.  %@NL@%
  1599.  
  1600. The PostScript printer driver has been modified to make it easier to add new
  1601. device support, without modifying the source files. The DDK provides a tool
  1602. called MKPRN.EXE, which is located on the Device Driver Samples and Tools
  1603. disk # 8 (13) under the \TOOLS directory. Use this tool to compile
  1604. PostScript Printer Description (PPD) files into Windows Printer Description
  1605. (WPD) files. You can then install .WPD files for the PostScript driver by
  1606. choosing the "Add Printer" option in the driver's dialog box. Once
  1607. installed, the device will be selectable from the list of printers in the
  1608. driver. See the %@AI@%Microsoft Windows Printers and Fonts Kit%@AE@% for more
  1609. information on this tool.  %@NL@%
  1610.  
  1611.  
  1612. %@3@%%@CR:C6A00060012 @%%@AB@%6.3.3  Raster Driver Sample Sources%@AE@%%@EH@%%@NL@%
  1613.  
  1614. Also included in this kit are sample sources for an older version Epson
  1615. 9-pin printer and an IBM Color Printer driver. These samples have been
  1616. updated from the original 2.x samples to reflect the new 3.0 feature support
  1617. for device initialization and an enhanced printer dialog box interface.  %@NL@%
  1618.  
  1619. The IBM Color Printer driver sources provide an example of supporting
  1620. 3-plane color bitmaps with a color library. This library may be linked to
  1621. your driver, or you may still choose to implement a different method for
  1622. supporting color on your device.  %@NL@%
  1623.  
  1624. The files are on the Device Driver Samples and Tools disks # 5 (8 / 9) under
  1625. the \PRINTERS\RASTER directory. To build the IBM Color Printer driver, you
  1626. need to run the batch file under the \PRINTERS\RASTER\COLOR\IBMCOLOR
  1627. directory:  %@NL@%
  1628.  
  1629. %@STUB@%    MAKEIT.BAT%@NL@%
  1630.  
  1631. To build the Epson printer driver, you need to run the MAKE file under the
  1632. \PRINTERS\RASTER\EPSON directory:  %@NL@%
  1633.  
  1634. %@STUB@%    MAKE EPSON%@NL@%
  1635.  
  1636. These raster driver sources should provide you with a good example for
  1637. implementing dot-matrix, ink-jet, and other raster device driver support.  %@NL@%
  1638.  
  1639.  
  1640. %@2@%%@CR:C6A00060013 @%%@AB@%6.4  Printer Driver Test Applications%@AE@%%@EH@%%@NL@%
  1641.  
  1642. The DDK includes a printer driver test application. You will find the
  1643. complete documentation, program executable, and source to this test under
  1644. the \TESTS\ITE directory on the Device Driver Samples and Tools disk # 7
  1645. (12). The program is called PRNTTEST.EXE and is in the \TESTS\ITE\BIN
  1646. subdirectory. The documentation for running the program is in
  1647. \TESTS\ITE\DOCS\PRNTTEST.TXT.  %@NL@%
  1648.  
  1649. The sources have been provided to aid in your debugging should you find a
  1650. problem while running the printer test program. If you need to build this
  1651. program for some reason, you should follow the instructions in the
  1652. README.TXT file under the \TESTS\ITE directory.  %@NL@%
  1653.  
  1654. Additional test files have also been provided for printing from various
  1655. Windows applications. You will find the documentation, along with the source
  1656. files for these tests, under the \TESTS\PRINT directory on the Device Driver
  1657. Samples and Tools disk # 6 (12).  %@NL@%
  1658.  
  1659.  
  1660. %@2@%%@CR:C6A00060014 @%%@AB@%6.5  Keyboard Driver Sources%@AE@%%@EH@%%@NL@%
  1661.  
  1662. The keyboard driver structure has been changed substantially since Windows
  1663. 2.x. If you currently have a Windows 2.x driver, you will need to rewrite
  1664. the driver to the new structure. We suggest you start your development with
  1665. the sources provided in this kit, adding support for your specific keyboard
  1666. where appropriate.  %@NL@%
  1667.  
  1668. The new keyboard sources are on the Device Driver Samples and Tools disk # 5
  1669. (13) under the \KEYBOARD directory. Copy all the files to your hard disk
  1670. with the MS_DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the
  1671. compressed files to their normal size after copying them to your hard disk.
  1672. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1673. details on how to do this.  %@NL@%
  1674.  
  1675. This driver also requires the INCLUDE file INT31.INC. You will need to copy
  1676. (and expand) this file from the \INCLUDE directory on the Virtual Device
  1677. Samples and Tools disk # 1 (1). Make sure this file is in your INCLUDE path.
  1678. %@NL@%
  1679.  
  1680. There is a batch file provided to build the IBM-style keyboard driver and
  1681. all the international tables for foreign keyboards. To build the drivers,
  1682. you need to run the MAKEKEYB.BAT batch file in the \KEYBOARD directory.  %@NL@%
  1683.  
  1684.  
  1685. %@2@%%@CR:C6A00060015 @%%@AB@%6.6  Mouse Driver Sources%@AE@%%@EH@%%@NL@%
  1686.  
  1687. The mouse driver has few changes from the version shipped with the Windows
  1688. 2.1 DDK. The driver was only modified to run correctly in the protected-mode
  1689. memory model.  %@NL@%
  1690.  
  1691. The Microsoft Mouse (or Microsoft Mouse-compatible) driver sources are on
  1692. the Device Driver Samples and Tools disk # 6 (10). Copy all the files from
  1693. the \MOUSE directory to your hard disk with the MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@%
  1694. command. Also, be sure to expand the compressed files to their normal size
  1695. after copying them to your hard disk. See Section 5.2, "Expand the
  1696. Compressed Files to Their Normal Size," for details on how to do this.  %@NL@%
  1697.  
  1698. To build the driver, run the following:  %@NL@%
  1699.  
  1700. %@STUB@%    MAKE MOUSE%@NL@%
  1701.  
  1702.  
  1703. %@2@%%@CR:C6A00060016 @%%@AB@%6.7  COMM Driver Sources%@AE@%%@EH@%%@NL@%
  1704.  
  1705. This driver has been enhanced to support COM1 through COM4 and dual-mode
  1706. execution with Windows 3.0.  %@NL@%
  1707.  
  1708. The COMM driver sources are on the Device Driver Samples and Tools disk # 6
  1709. (10). Copy all the files from the \COMM directory to your hard disk with the
  1710. MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the compressed files
  1711. to their normal size after copying them to your hard disk. See Section 5.2,
  1712. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1713. this.  %@NL@%
  1714.  
  1715. This driver also requires the INCLUDE file INT31.INC. You will need to copy
  1716. (and expand) this file from the \INCLUDE directory on the Virtual Device
  1717. Samples and Tools disk # 1 (1). Make sure this file is in your INCLUDE path.
  1718. %@NL@%
  1719.  
  1720. To build the driver, run the following:  %@NL@%
  1721.  
  1722. %@STUB@%    MAKE COMM%@NL@%
  1723.  
  1724.  
  1725. %@2@%%@CR:C6A00060017 @%%@AB@%6.8  Sound Driver Sources%@AE@%%@EH@%%@NL@%
  1726.  
  1727. The sound driver has few changes from the version shipped with the Windows
  1728. 2.1 DDK. The driver was only modified to run correctly in the protected-mode
  1729. memory model.  %@NL@%
  1730.  
  1731. The sound driver sources are on the Device Driver Samples and Tools disk # 6
  1732. (10). Copy all the files from the \SOUND directory to your hard disk with
  1733. the MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the compressed
  1734. files to their normal size after copying them to your hard disk. See Section
  1735. 5.2, "Expand the Compressed Files to Their Normal Size," for details on how
  1736. to do this.  %@NL@%
  1737.  
  1738. To build the driver, run the following:  %@NL@%
  1739.  
  1740. %@STUB@%    MAKE SOUND%@NL@%
  1741.  
  1742.  
  1743. %@2@%%@CR:C6A00060018 @%%@AB@%6.9  Network Driver Sources%@AE@%%@EH@%%@NL@%
  1744.  
  1745. These network driver sources are new for Windows 3.0 and enable the Windows
  1746. File Manager, Print Manager, and Control Panel to perform network functions
  1747. such as connecting to network drivers.  %@NL@%
  1748.  
  1749. The MS-Net network driver sources are on the Device Driver Samples and Tools
  1750. disk # 5 (9). Copy all the files from the \NET directory to your hard disk
  1751. with the MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the
  1752. compressed files to their normal size after copying them to your hard disk.
  1753. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1754. details on how to do this.  %@NL@%
  1755.  
  1756. To build the driver, run the following:  %@NL@%
  1757.  
  1758. %@STUB@%    MAKE MSNET%@NL@%
  1759.  
  1760.  
  1761. %@2@%%@CR:C6A00060019 @%%@AB@%6.10  Network Driver and HCT Test Applications%@AE@%%@EH@%%@NL@%
  1762.  
  1763. The DDK includes a network driver test application. You will find the
  1764. documentation, program executable, and source for this test under the
  1765. \TESTS\NETTEST directory on the Device Driver Samples and Tools disk # 7
  1766. (12). The program is called NETTEST.EXE and is in the \TESTS\NETTEST\BIN
  1767. subdirectory.  %@NL@%
  1768.  
  1769. The sources have been provided to aid in your debugging should you find a
  1770. problem while running the network test program. If you need to build this
  1771. program for some reason or need documentation for running the program, you
  1772. should follow the instructions in the README.TXT file under the
  1773. \TESTS\NETTEST directory.  %@NL@%
  1774.  
  1775. The DDK also includes a hardware compatibility test application. This test
  1776. suite contains a series of testing components that will help to verify that
  1777. your hardware is compatible with Windows 3.0. You will find the
  1778. documentation, program executables, and sources for these tests under the
  1779. \TESTS\HCT directory on the Device Driver Samples and Tools disk # 7 (13).
  1780. The documentation for running the program is in \TESTS\HCT\README.DOC.  %@NL@%
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787. %@CR:C6A00070001 @%%@1@%%@AB@%Chapter 7  Windows 3.0 Virtual Device Sources%@AE@%%@EH@%%@NL@%
  1788. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1789.  
  1790. These virtual device sources are provided to you to begin development for
  1791. Windows 3.0 386 enhanced mode virtual device support. Each source directory
  1792. contains one or more .ASM source files, a .DEF file, and two MAKE files. The
  1793. first MAKE file is usually called MAKEFILE (or MAKEVGA for the VGA VDD) and
  1794. is used with Microsoft NMAKE or with other Unix-style MAKE utilities. The
  1795. second one, called by the name of the file being produced (e.g., VPD), is
  1796. used with the standard Microsoft MAKE utility. You can use either MAKE file
  1797. to produce virtual devices. Notice, however, that NMAKE is not provided in
  1798. the DDK. It is included, though, with some Microsoft language products, such
  1799. as Microsoft C Professional Development System version 6.0.  %@NL@%
  1800.  
  1801. These MAKE files offer examples of the proper use of the tools and options,
  1802. and of the general build procedures that should be followed in developing
  1803. virtual devices. Also, be sure to expand the compressed files to their
  1804. normal size after copying them to your hard disk. See Section 5.2, "Expand
  1805. the Compressed Files to Their Normal Size," for details on how to do this.  %@NL@%
  1806.  
  1807. Notice that, if you encounter random results or problems when building these
  1808. virtual devices, it may be due to a low-memory situation. This can be
  1809. resolved by creating more memory for your system by removing such things as
  1810. TSRs and Network software.  %@NL@%
  1811.  
  1812. The following table provides a summary of all the source files mentioned in
  1813. this chapter and their locations on the 5.25 inch (or 3.5 inch) DDK Virtual
  1814. Device Samples and Tools disks:  %@NL@%
  1815.  
  1816. %@TH:  29  1392 02 24 11 41 @%
  1817. Sources for             On disk #  Directory name
  1818. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1819. CGA displays            1 (2)      \VDDCGA
  1820. Compaq Plasma           1 (2)      \VDDCGA
  1821. EGA displays            1 (2)      \VDDEGA
  1822. VGA displays            1 (2)      \VDDEGA
  1823. 8514/a display          1 (2)      \VDDEGA
  1824. Hercules display        1 (2)      \VDDHERC
  1825. CGA grabbers            2 (3)      \GRABBERS
  1826. EGA grabbers            2 (3)      \GRABBERS
  1827. VGA grabbers            2 (3)      \GRABBERS
  1828. 8514/a grabbers         2 (3)      \GRABBERS
  1829. Hercules grabbers       2 (3)      \GRABBERS
  1830. ATT/Compaq grabbers     2 (3)      \GRABBERS
  1831. Grabber font files      2 (3)      \OEMFONTS
  1832. DMA devices             1 (2)      \VDMAD
  1833. EBIOS devices           1 (1)      \EBIOS
  1834. Hard Disk devices       1 (2)      \VHD
  1835. Keyboard devices        1 (2)      \VKD
  1836. Mouse devices           2 (2)      \VMD
  1837. NetBIOS devices         2 (3)      \VNETBIOS
  1838. DOS network devices     2 (3)      \LDOSNET
  1839. ROM BIOS devices        2 (3)      \BIOSXLAT
  1840. Paging devices          1 (1)      \PAGESWAP
  1841. Printer devices         2 (3)      \VPD
  1842. Communications devices  2 (2)      \VCD
  1843. COM Buffer devices      2 (2)      \COMBUFF
  1844. Floppy drive devices    2 (2)      \VFD
  1845. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1846. %@TE:  29  1392 02 24 11 41 @%
  1847.  
  1848.  
  1849. %@2@%%@CR:C6A00070002 @%%@AB@%7.1  The Display Devices (CGA, EGA, VGA, 8514/a, HERC)%@AE@%%@EH@%%@NL@%
  1850.  
  1851. This device virtualizes the video display and is the most complex of the
  1852. devices supplied in the DDK.  %@NL@%
  1853.  
  1854. The various VDD sources are on the Virtual Device Samples and Tools disks
  1855. under the directories \VDDCGA, \VDDEGA and \VDDHERC. See the table at the
  1856. beginning of this chapter for a complete list of all the sources and their
  1857. locations. Be sure to expand the compressed files to their normal size after
  1858. copying them to your hard disk. See Section 5.2, "Expand the Compressed
  1859. Files to Their Normal Size," for details on how to do this.  %@NL@%
  1860.  
  1861. The \VDDCGA source tree only contains files to build the CGA VDD. This VDD
  1862. also provides support for the Compaq Plasma display, which is sometimes
  1863. called IDC.  %@NL@%
  1864.  
  1865. The \VDDEGA source tree uses conditional assembly to build three separate
  1866. virtual devices to handle EGA, VGA, and 8514/a video adapters.  %@NL@%
  1867.  
  1868. The \VDDHERC source tree only contains files to build the Hercules VDD.  %@NL@%
  1869.  
  1870. You will find different MAKE files for each of the VDDs in their appropriate
  1871. directories. The following is a list of the MAKE filenames (for NMAKE and
  1872. DOS MAKE) for each VDD:  %@NL@%
  1873.  
  1874. %@TH:   7   292 02 10 10 56 @%
  1875. Adapter   NMAKE     DOS MAKE
  1876. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1877. CGA/IDC   MAKEFILE  VDDCGA
  1878. EGA       MAKEEGA   VDDEGA
  1879. VGA       MAKEVGA   VDDVGA
  1880. 8514/a    MAKE8514  VDD8514
  1881. Hercules  MAKEFILE  VDDHERC
  1882. %@TE:   7   292 02 10 10 56 @%
  1883.  
  1884. Notice that, if you are using NMAKE, you may need to rename the appropriate
  1885. NMAKE filename to "MAKEFILE." Some versions of NMAKE always use the
  1886. "MAKEFILE" filename.  %@NL@%
  1887.  
  1888. The EGA, VGA, and 8514/a VDDs all share common code but compile with
  1889. different switches. Therefore, if you build one VDD and, then, want to build
  1890. a different one, you must delete all the .OBJ files in the VDDEGA directory.
  1891. %@NL@%
  1892.  
  1893.  
  1894. %@2@%%@CR:C6A00070003 @%%@AB@%7.2  The Display/Windows Interface (GRABBER)%@AE@%%@EH@%%@NL@%
  1895.  
  1896. The grabbers for 386 enhanced mode are different from those used when
  1897. running in real or standard mode. These are responsible for rendering a
  1898. virtual machine's display context within a window. Therefore, they are
  1899. closely bound with the virtual display device (VDD). Each VDD needs to be
  1900. accompanied by its own grabber as a linked pair.  %@NL@%
  1901.  
  1902. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  1903. the \GRABBERS directory structure. Be sure to expand the compressed files to
  1904. their normal size after copying them to your hard disk. See Section 5.2,
  1905. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1906. this.  %@NL@%
  1907.  
  1908. The DDK contains sources for CGA, EGA, VGA, 8514/a, Compaq Plasma, and
  1909. Hercules grabbers. Since they are all built in the same directory, different
  1910. MAKE files are provided for each. The following is a list of the MAKE
  1911. filenames (for NMAKE and DOS MAKE) for each grabber:  %@NL@%
  1912.  
  1913. %@TH:   8   355 02 15 10 51 @%
  1914. Adapter        NMAKE     DOS MAKE
  1915. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1916. CGA            MAKECGA   CGAGRB
  1917. EGA            MAKEFILE  EGAGRB
  1918. VGA            MAKEVGA   VGAGRB
  1919. 8514/a         MAKE8514  8514GRB
  1920. Hercules       MAKEHERC  HERCGRB
  1921. ATT(R)/Compaq  MAKEPLSM  PLSMGRB
  1922. %@TE:   8   355 02 15 10 51 @%
  1923.  
  1924. Notice that, if you are using NMAKE, you may need to rename the appropriate
  1925. NMAKE file to "MAKEFILE." Some versions of NMAKE always use the "MAKEFILE"
  1926. filename.  %@NL@%
  1927.  
  1928. The font files used by the grabbers when running in a window are provided in
  1929. this kit. You will find them on the Virtual Device Samples and Tools disk #
  1930. 2 (3) under the \OEMFONTS directory structure.  %@NL@%
  1931.  
  1932. Before building the OEM fonts, you need to create the FONTS.OBJ file by
  1933. running the following from the \OEMFONTS directory:  %@NL@%
  1934.  
  1935. %@STUB@%    MASM FONTS;%@NL@%
  1936.  
  1937. Once this is completed, you run the MAKE file from the \FONTS directory:  %@NL@%
  1938.  
  1939. %@STUB@%    MAKE FONTS%@NL@%
  1940.  
  1941. To build these files properly, you need to make sure you have WINSTUB.EXE,
  1942. which is provided in the SDK, in your MS-DOS path %@AI@%before%@AE@% building the
  1943. grabbers and/or OEM font files.  %@NL@%
  1944.  
  1945.  
  1946. %@2@%%@CR:C6A00070004 @%%@AB@%7.3  The DMA Device (VDMAD)%@AE@%%@EH@%%@NL@%
  1947.  
  1948. This device handles direct memory access (DMA) devices. Virtual devices can
  1949. support hardware cards that use DMA by calling the DMA services provided by
  1950. the VDMAD. These services are documented in Chapter 41, "Virtual DMA Device
  1951. (VDMAD) Services," of the %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@%.
  1952. %@NL@%
  1953.  
  1954. See Section 7.15, "The Floppy Drive Device (VFD)," for an example of a
  1955. device that uses the DMA services. Be sure to expand the compressed files to
  1956. their normal size after copying them to your hard disk. See Section 5.2,
  1957. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1958. this.  %@NL@%
  1959.  
  1960. The VDMAD should not normally need to be customized; it should only need to
  1961. be altered to support DMA on machines with non-standard architectures.  %@NL@%
  1962.  
  1963. The sources are on the Virtual Device Samples and Tools disk # 1 (2) under
  1964. the \VDMAD directory structure.  %@NL@%
  1965.  
  1966.  
  1967. %@2@%%@CR:C6A00070005 @%%@AB@%7.4  The EBIOS Device (EBIOS)%@AE@%%@EH@%%@NL@%
  1968.  
  1969. This device detects the extended BIOS data region on machines that use it
  1970. such as the PS/2, identifies it, and ensures that it is reserved as global
  1971. memory.  %@NL@%
  1972.  
  1973. It will probably not need to be modified. However, it is provided here as an
  1974. example of a relatively simple device that passively accommodates something
  1975. in the environment.  %@NL@%
  1976.  
  1977. The sources are on the Virtual Device Samples and Tools disk # 1 (1) under
  1978. the \EBIOS directory structure. Be sure to expand the compressed files to
  1979. their normal size after copying them to your hard disk. See Section 5.2,
  1980. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1981. this.  %@NL@%
  1982.  
  1983.  
  1984. %@2@%%@CR:C6A00070006 @%%@AB@%7.5  The Hard Disk Device (VHD)%@AE@%%@EH@%%@NL@%
  1985.  
  1986. This device virtualizes access to the hard disk. It also provides direct
  1987. access to the disk for demand paging on compatible hardware.  %@NL@%
  1988.  
  1989. This should be modified to support incompatible hard disks.  %@NL@%
  1990.  
  1991. The sources are on the Virtual Device Samples and Tools disk # 1 (2) under
  1992. the \VHD directory structure. Be sure to expand the compressed files to
  1993. their normal size after copying them to your hard disk. See Section 5.2,
  1994. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1995. this.  %@NL@%
  1996.  
  1997.  
  1998. %@2@%%@CR:C6A00070007 @%%@AB@%7.6  The Keyboard Device (VKD)%@AE@%%@EH@%%@NL@%
  1999.  
  2000. This is one of the more complicated virtual devices, as it not only
  2001. virtualizes the keyboard but also interacts with the Windows shell to handle
  2002. hotkeys and other special functions. It should be modified to support other,
  2003. nonstandard keyboards.  %@NL@%
  2004.  
  2005. The sources are on the Virtual Device Samples and Tools disk # 1 (2) under
  2006. the \VKD directory structure. Be sure to expand the compressed files to
  2007. their normal size after copying them to your hard disk. See Section 5.2,
  2008. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2009. this.  %@NL@%
  2010.  
  2011.  
  2012. %@2@%%@CR:C6A00070008 @%%@AB@%7.7  The Mouse Device (VMD)%@AE@%%@EH@%%@NL@%
  2013.  
  2014. This device virtualizes the mouse and maps the INT 33H API between protected
  2015. mode and virtual 8086 mode.  %@NL@%
  2016.  
  2017. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  2018. the \VMD directory structure. Be sure to expand the compressed files to
  2019. their normal size after copying them to your hard disk. See Section 5.2,
  2020. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2021. this.  %@NL@%
  2022.  
  2023.  
  2024. %@2@%%@CR:C6A00070009 @%%@AB@%7.8  The NetBIOS Device (VNETBIOS)%@AE@%%@EH@%%@NL@%
  2025.  
  2026. This device maps the NetBIOS API between protected mode and virtual 8086
  2027. mode, enabling Windows applications to access the network using NetBIOS
  2028. calls. It also handles asynchronous network transactions by mapping the
  2029. application's buffer into global memory, so the network software can access
  2030. it when the asynchronous event occurs, even if another virtual machine is
  2031. running at that time.  %@NL@%
  2032.  
  2033. This should be modified by network vendors who extend the standard NetBIOS
  2034. interface and should also serve as a guide to writing virtual devices for
  2035. other types of network API.  %@NL@%
  2036.  
  2037. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  2038. the \VNETBIOS directory structure. Be sure to expand the compressed files to
  2039. their normal size after copying them to your hard disk. See Section 5.2,
  2040. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2041. this.  %@NL@%
  2042.  
  2043.  
  2044. %@2@%%@CR:C6A00070010 @%%@AB@%7.9  The Local DOS Network Device (LDOSNET)%@AE@%%@EH@%%@NL@%
  2045.  
  2046. This device is not part of the Windows 3.0 retail package. However, it is
  2047. included in the DDK as a sample source to demonstrate some mechanisms used
  2048. in supporting network functionality.  %@NL@%
  2049.  
  2050. In general, this device manages network connections and ensures network
  2051. integrity across all virtual machines.  %@NL@%
  2052.  
  2053. This source was included in previous DDK releases under the name DOSNET.
  2054. However, it has been replaced in the Windows 3.0 retail package by a new
  2055. DOSNET device that makes network connections global across all virtual
  2056. machines. The version included here keeps connections local, but allows
  2057. inheritance. It has, therefore, been renamed LDOSNET to avoid confusion.  %@NL@%
  2058.  
  2059. The device could serve as a model for handling some types of networks. In
  2060. general, however, we recommend that network connections be global instead of
  2061. local.  %@NL@%
  2062.  
  2063. On MS-Net networks, the enhanced Windows LDOSNET device provides the
  2064. following support:  %@NL@%
  2065.  
  2066.  
  2067.   ■   If a connection exists before Windows is started, it is global and
  2068.       cannot be deleted from within Windows or any VMs.%@NL@%
  2069.  
  2070.   ■   If the user makes a connection in Windows and, then, spawns off
  2071.       another virtual machine, that VM inherits Windows' connections as of
  2072.       that time.%@NL@%
  2073.  
  2074.   ■   If a VM has inherited a connection from Windows, it cannot delete it.%@NL@%
  2075.  
  2076.   ■   If any VM exists that inherited a particular connection from Windows,
  2077.       Windows cannot delete that connection.%@NL@%
  2078.  
  2079.  
  2080. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  2081. the \LDOSNET directory structure. Be sure to expand the compressed files to
  2082. their normal size after copying them to your hard disk. See Section 5.2,
  2083. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2084. this.  %@NL@%
  2085.  
  2086.  
  2087. %@2@%%@CR:C6A00070011 @%%@AB@%7.10  The BIOS Device (BIOSXLAT)%@AE@%%@EH@%%@NL@%
  2088.  
  2089. This device maps the ROM BIOS API between protected mode and virtual 8086
  2090. mode, thereby providing Windows applications and device drivers with access
  2091. to ROM BIOS services.  %@NL@%
  2092.  
  2093. This should be modified when there are non-standard ROM BIOS calls that pass
  2094. pointers to memory and that are used by Windows applications or device
  2095. drivers.  %@NL@%
  2096.  
  2097. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  2098. the \BIOSXLAT directory structure. Be sure to expand the compressed files to
  2099. their normal size after copying them to your hard disk. See Section 5.2,
  2100. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2101. this.  %@NL@%
  2102.  
  2103.  
  2104. %@2@%%@CR:C6A00070012 @%%@AB@%7.11  The Paging Device (PAGESWAP)%@AE@%%@EH@%%@NL@%
  2105.  
  2106. This device is used by 386 enhanced mode for demand paging at either the INT
  2107. 21H or INT 13H level.  %@NL@%
  2108.  
  2109. The sources are on the Virtual Device Samples and Tools disk # 1 (1) under
  2110. the \PAGESWAP directory structure. Be sure to expand the compressed files to
  2111. their normal size after copying them to your hard disk. See Section 5.2,
  2112. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2113. this.  %@NL@%
  2114.  
  2115.  
  2116. %@2@%%@CR:C6A00070013 @%%@AB@%7.12  The Printer Device (VPD)%@AE@%%@EH@%%@NL@%
  2117.  
  2118. The printer device virtualizes access to the parallel ports. If a second
  2119. virtual machine tries to access one of the ports while it is being used by
  2120. another application, a contention dialog is presented to the user that
  2121. allows them to resolve the ownership dispute.  %@NL@%
  2122.  
  2123. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  2124. the \VPD directory structure. Be sure to expand the compressed files to
  2125. their normal size after copying them to your hard disk. See Section 5.2,
  2126. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2127. this.  %@NL@%
  2128.  
  2129.  
  2130. %@2@%%@CR:C6A00070014 @%%@AB@%7.13  The COMM Device (VCD)%@AE@%%@EH@%%@NL@%
  2131.  
  2132. This device virtualizes the standard serial ports on ISA type machines. It
  2133. supports COM1 through COM4.  %@NL@%
  2134.  
  2135. It should be modified to add support for different chip sets or for
  2136. additional COM ports.  %@NL@%
  2137.  
  2138. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  2139. the \VCD directory structure. Be sure to expand the compressed files to
  2140. their normal size after copying them to your hard disk. See Section 5.2,
  2141. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2142. this.  %@NL@%
  2143.  
  2144.  
  2145. %@2@%%@CR:C6A00070015 @%%@AB@%7.14  The COM Buffer Device (COMBUFF)%@AE@%%@EH@%%@NL@%
  2146.  
  2147. This device is responsible for buffering COM I/O. It is closely tied to the
  2148. Virtual COMM Device (VCD).  %@NL@%
  2149.  
  2150. It can be modified to support alternative serial communications ports or to
  2151. use specific XON/XOFF protocols instead of relying on the applications to do
  2152. so.  %@NL@%
  2153.  
  2154. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  2155. the \COMBUFF directory structure. Be sure to expand the compressed files to
  2156. their normal size after copying them to your hard disk. See Section 5.2,
  2157. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2158. this.  %@NL@%
  2159.  
  2160.  
  2161. %@2@%%@CR:C6A00070016 @%%@AB@%7.15  The Floppy Drive Device (VFD)%@AE@%%@EH@%%@NL@%
  2162.  
  2163. This device is responsible for the removal of special timer port trappings
  2164. to ensure that copy-protection schemes work properly, and for communications
  2165. with the VDMAD to synchronize DMA channel usage.  %@NL@%
  2166.  
  2167. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  2168. the \VFD directory structure. Be sure to expand the compressed files to
  2169. their normal size after copying them to your hard disk. See Section 5.2,
  2170. "Expand the Compressed Files to Their Normal Size," for details on how to do
  2171. this.  %@NL@%
  2172.  
  2173.  
  2174.  
  2175.