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 @%Library                 Used for building%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%SWINLIBC.LIB            All Windows device driversUSER.LIB                Printer driversGDI.LIB                 Printer driversKERNEL.LIB              Communications driversC51 subdirectory        Drivers with the C5.1 Compiler only%@TE:   7   403 02 24 52 @%
  675.  
  676.  
  677. %@2@%%@CR:C6A00030007 @%%@AB@%3.6  INCLUDE Files%@AE@%%@EH@%%@NL@%
  678.  
  679. Most of these files are located in the \INCLUDE directory on the Device
  680. Driver Samples and Tools disk # 6 (5.25 inch) or 10 (3.5 inch). They are
  681. updated INCLUDE and header (.H) files for building Windows device drivers
  682. and virtual devices.  %@NL@%
  683.  
  684. If you are writing a virtual device, you also need to use some additional
  685. INCLUDE files. See the following section on virtual device INCLUDE files for
  686. more information on these files.  %@NL@%
  687.  
  688. You should add the appropriate Windows INCLUDE and header files to the
  689. Windows 3.0 \INCLUDE directory that you created during the SDK Install
  690. procedure. When writing assembly language drivers, you will need to
  691. incorporate at least the following INCLUDE (.INC) files:  %@NL@%
  692.  
  693. %@TH:   5   319 02 19 57 @%INCLUDE file       Used for building%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CMACROS.INC        All assembly-language driversGDIDEFS.INC        Display and printer driversWINDEFS.INC        Drivers affected by asynchronous interrupts%@TE:   5   319 02 19 57 @%
  694.  
  695. Some of these contain both C and ASM definitions and, therefore, can also be
  696. used in drivers written in C. (See Chapter 1, "Overview of Windows," in the
  697. %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@% for more detailed
  698. information on INCLUDE files.)  %@NL@%
  699.  
  700. The most important INCLUDE file is CMACROS.INC, which contains a set of
  701. assembly-language macros that provide a simplified interface to the function
  702. and segment conventions of high-level languages such as C and Pascal.  %@NL@%
  703.  
  704. GDIDEFS.INC enables you to follow the good practice of referring to symbolic
  705. constants and structures by their Windows standard names.  %@NL@%
  706.  
  707. WINDEFS.INC contains two very useful macros that are used to turn off
  708. hardware interrupts such as those from the floppy and hard disk controllers,
  709. math coprocessor, timer, keyboard, and mouse. Use the %@AB@%EnterCrit%@AE@% and
  710. %@AB@%LeaveCrit%@AE@% macros whenever you do not want an asynchronous interrupt to
  711. reenter an area of code that Windows is executing.  %@NL@%
  712.  
  713. The following is a list of some of the other required INCLUDE files.  %@NL@%
  714.  
  715. %@TH:   8   408 02 21 55 @%INCLUDE file         Used with%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%WINDOWS.H            Printer driversSPOOLS.H             Printer driversPRINTER.H            Printer driversGRABBER.INC          Display driversWINNET.H             Network drivers (C Version)WNET.INC             Network drivers (Assembler version)%@TE:   8   408 02 21 55 @%
  716.  
  717.  
  718. %@2@%%@CR:C6A00030008 @%%@AB@%3.7  Special INCLUDE Files For Building Virtual Devices%@AE@%%@EH@%%@NL@%
  719.  
  720. To build the sample virtual devices correctly, you need to install all the
  721. files in the \INCLUDE directory from the Virtual Device Samples and Tools
  722. disks. The \INCLUDE directory contains .INC files used by the sample virtual
  723. device sources. This directory must be placed at the same directory level as
  724. the source directories, because they are referenced in the MAKE files in the
  725. following manner:  %@NL@%
  726.  
  727. %@STUB@%    ..\..\..\INCLUDE\%@AI@%SAMPLE.INC%@AE@%%@NL@%
  728.  
  729. This requirement, however, does not apply to INCLUDE files provided on the
  730. Device Driver Samples and Tools disks, or to those with the Windows 3.0 SDK
  731. or standard Microsoft language products. It only pertains to the virtual
  732. device sample sources provided in this kit.  %@NL@%
  733.  
  734. The \INCLUDE directory can be moved, though, if you modify the MAKE files
  735. appropriately.  %@NL@%
  736.  
  737.  
  738. %@2@%%@CR:C6A00030009 @%%@AB@%3.8  Special Tools For Building Virtual Devices%@AE@%%@EH@%%@NL@%
  739.  
  740. To build the sample virtual devices correctly, you need to install all the
  741. files in the \TOOLS directory on the Virtual Device Samples and Tools disks.
  742. The files in the \TOOLS directory should be put into the Windows 3.0 \TOOLS
  743. directory that was created by the SDK Install program.  %@NL@%
  744.  
  745. The \TOOLS directory contains utilities that are required for building
  746. virtual devices. However, these are not currently part of the standard
  747. Windows 3.0 SDK tool set and are not readily available with most Microsoft
  748. language products.  %@NL@%
  749.  
  750. This directory contains the following tools, each of which is necessary to
  751. build the virtual device sample sources with the MAKE files provided:  %@NL@%
  752.  
  753.  
  754.   ■   ADDHDR is a utility used to modify the headers of virtual devices. It
  755.       takes only one parameter, the name of the virtual device file, and
  756.       should be run as a standard part of every build procedure.%@NL@%
  757.  
  758.   ■   LINK386 is a special version of the Microsoft Segmented-Executable
  759.       Linker that is provided specifically for building virtual devices.
  760.       This version has been modified to understand 32-bit offsets.%@NL@%
  761.  
  762.   ■   MAPSYM32 is a version of the standard MAPSYM utility that is used to
  763.       convert map files produced by the linker into symbol files used by
  764.       some debuggers. This version has been modified to understand 32-bit
  765.       offsets.%@NL@%
  766.  
  767.   ■   MASM5 is a special version of the Microsoft Macro Assembler, version
  768.       5.10B, that supports the 32-bit address space required for virtual
  769.       devices. It has been named MASM5.EXE so it will not conflict with your
  770.       standard MASM executables. %@NL@%
  771.  
  772.  
  773.  
  774. %@2@%%@CR:C6A00030010 @%%@AB@%3.9  Summary List of Special Files%@AE@%%@EH@%%@NL@%
  775.  
  776. The following is a list of all the special files referred to in this chapter
  777. along with directions on where to find them on the 5.25 inch (or 3.5 inch)
  778. disks:  %@NL@%
  779.  
  780. %@TH:  28  1837 02 20 56 @%Special file        Where to find it%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%IMPLIB.EXE          Microsoft C CompilerLINK4.EXE           DDK Device Driver S & T Disk # 8 (14) - \TOOLSSWINLIBC.LIB        DDK Device Driver S & T Disk # 6 (11) - \LIBUSER.LIB            DDK Device Driver S & T Disk # 6 (11) - \LIBGDI.LIB             DDK Device Driver S & T Disk # 6 (11) - \LIBKERNEL.LIB          DDK Device Driver S & T Disk # 6 (11) - \LIBC51 subdirectory    DDK Device Driver S & T Disk # 6 (11) - \LIBCMACROS.INC         Microsoft Windows SDKGDIDEFS.INC         DDK Device Driver S & T Disk # 6 (10) - \INCLUDEWINDEFS.INC         DDK Device Driver S & T Disk # 6 (10) - \INCLUDEWINDOWS.H           Microsoft Windows SDKSPOOL.H             DDK Device Driver S & T Disk # 6 (10) - \INCLUDEPRINTER.H           DDK Device Driver S & T Disk # 6 (10) - \INCLUDEGRABBER.INC         DDK Device Driver S & T Disk # 6 (10) - \INCLUDEWINNET.H            DDK Device Driver S & T Disk # 6 (10) - \INCLUDEWNET.INC            DDK Device Driver S & T Disk # 5 (9) - \NETINT31.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDEVMM.INC             DDK Virtual Device S & T Disk # 1 (1) - \INCLUDEDEBUG.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDEVPICD.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDESHELL.INC           DDK Virtual Device S & T Disk # 1 (1) - \INCLUDEVDD.INC             DDK Virtual Device S & T Disk # 1 (1) - \INCLUDEADDHDR.EXE          DDK Virtual Device S & T Disk # 1 (1) - \TOOLSLINK386.EXE         DDK Virtual Device S & T Disk # 1 (1) - \TOOLSMAPSYM32.EXE        DDK Virtual Device S & T Disk # 1 (1) - \TOOLSMASM5.EXE           DDK Virtual Device S & T Disk # 1 (1) - \TOOLS%@TE:  28  1837 02 20 56 @%
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787. %@CR:C6A00040001 @%%@1@%%@AB@%Chapter 4  Recommended Development Process%@AE@%%@EH@%%@NL@%
  788. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  789.  
  790. This chapter provides an ordered outline of the steps you should follow when
  791. developing a new device driver or virtual device. It also directs you to the
  792. appropriate sections for the detailed information you will need to
  793. accomplish each step.  %@NL@%
  794.  
  795.  
  796. %@2@%%@CR:C6A00040002 @%%@AB@%4.1  Copy All Required Tools and Sources To Your Hard Disk%@AE@%%@EH@%%@NL@%
  797.  
  798. See Chapter 5, "System Setup and Tools Installation," in this guide to
  799. assist you in copying to your hard disk all the files that you will need to
  800. create your device driver and/or virtual device. It is important to remember
  801. that the files have been provided in a compressed format and need to be
  802. restored first to their original size before using them. See Section 5.2,
  803. "Expand the Compressed Files to Their Normal Size," for further information
  804. on how to do this.  %@NL@%
  805.  
  806.  
  807. %@2@%%@CR:C6A00040003 @%%@AB@%4.2  Familiarize Yourself With the Debugging Tools%@AE@%%@EH@%%@NL@%
  808.  
  809. There are several debugging tools provided with and documented in the SDK:
  810. CodeView(R) Windows (CVW), SYMDEB, and WDEB386. CodeView is used mainly for
  811. C debugging (e.g., printer drivers) and WDEB386 is used for assembly
  812. debugging (e.g., display drivers).  %@NL@%
  813.  
  814. If you have the appropriate hardware necessary for running CVW, you should
  815. try using this tool for your debugging. Otherwise, you should use the SYMDEB
  816. debugger whenever you are debugging in the real-mode memory model and the
  817. WDEB386 debugger when debugging in protected mode. Notice that, despite the
  818. name, the WDEB386 debugger can be used with either the 80286, 80386, or
  819. 80486 processors. See the SDK documentation for more information on using
  820. these debuggers.  %@NL@%
  821.  
  822.  
  823. %@2@%%@CR:C6A00040004 @%%@AB@%4.3  Build a Sample Driver%@AE@%%@EH@%%@NL@%
  824.  
  825. The best way to test your development environment is to build one of the
  826. sample device drivers included in this kit. To build one, follow these
  827. general steps. More detailed instructions are given in the remaining
  828. chapters. How to build a virtual device is described in greater detail in
  829. the %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@%.  %@NL@%
  830.  
  831.  
  832.   1.  Choose the disk containing the sample driver most similar to your
  833.       device. (See Chapter 6, "Windows 3.0 Device Driver Sources," and
  834.       Chapter 7, "Windows 3.0 Virtual Device Sources," in this guide for a
  835.       complete list of the sample drivers included with this kit.)%@NL@%
  836.  
  837.   2.  Copy from the floppy disk to your hard disk and then expand all the
  838.       files pertaining to that driver.  (See Chapter 5, "System Setup and
  839.       Tools Installation," for more information on these files.)%@NL@%
  840.  
  841.   3.  Follow the instructions in the MAKE file for that driver. Be sure to
  842.       read the important building information in the header for the MAKE
  843.       file before attempting to build the driver. %@NL@%
  844.  
  845.   4.  Modify the SYSTEM.INI file, which is located in the Windows directory,
  846.       to set the "currently selected" driver to your newly built driver so
  847.       that you can test it. To understand the structure and format of the
  848.       SYSTEM.INI file, read the SYSINI.TXT file.%@NL@%
  849.  
  850. %@STUB@%      The following is a debugging example using a VGA display driver as a
  851.       sample. To debug it, enter the following command:%@NL@%
  852.  
  853. %@AS@%      WDEB386 -S:<path>VGA.SYM[-S:other symbol maps] WIN/3 (or WIN/2 or
  854. %@AS@%      WIN/r)%@AE@%
  855.  
  856. %@STUB@%      All debugging output is then directed to COM1, with a 9600 baud rate,
  857.       no parity, 8 bits-per-character, and 1 stop bit. For further details
  858.       on debugging, see the %@AI@%Microsoft Windows Software Development Kit%@AE@%.%@NL@%
  859.  
  860. %@STUB@%      If you built a sample printer driver, use the Control Panel program
  861.       provided with the Windows 3.0 retail product to install your driver
  862.       for testing.%@NL@%
  863.  
  864.  
  865.  
  866. %@2@%%@CR:C6A00040005 @%%@AB@%4.4  Use the Test Applications%@AE@%%@EH@%%@NL@%
  867.  
  868. To help you in the testing of your display and printer drivers, we have
  869. included test applications and test files for use in printing from various
  870. Windows applications. These test applications can be found under the
  871. \TESTS\ITE directory, where ITE stands for Integrated Test Environment, and
  872. the test files are under the \TESTS\PRINT directory.  %@NL@%
  873.  
  874. See Section 6.2, "Display Driver Test Applications," and Section 6.4,
  875. "Printer Driver Test Applications," in this guide for more information on
  876. these applications and files. See Section 6.10, "Network Driver and HCT Test
  877. Applications," for more information on the hardware compatibility test and
  878. network test applications.  %@NL@%
  879.  
  880. The SDK also contains several test applications that are mentioned, where
  881. appropriate, later in this guide.  %@NL@%
  882.  
  883.  
  884. %@2@%%@CR:C6A00040006 @%%@AB@%4.5  Create a Distribution Disk%@AE@%%@EH@%%@NL@%
  885.  
  886. Once you are convinced that you have thoroughly tested your device driver or
  887. virtual device and have found it to be functioning properly, you should
  888. create the distribution disk with which the end-user will install your new
  889. device driver or virtual device. See Appendix C, "Creating Distribution
  890. Disks for Drivers," in the %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@%
  891. for the detailed steps involved.  %@NL@%
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. %@CR:C6A00050001 @%%@1@%%@AB@%Chapter 5  System Setup and Tools Installation%@AE@%%@EH@%%@NL@%
  899. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  900.  
  901. Before installing the DDK software, you must first install the SDK software.
  902. The SDK %@AI@% Installation and Update Guide%@AE@% contains directions for installing
  903. the basic tools you will need for building device drivers. If you plan to
  904. debug and test your driver, you must also install the retail Microsoft
  905. Windows 3.0 software following the instructions in the %@AI@%Microsoft Windows
  906. %@AI@%Users Guide%@AE@%.  %@NL@%
  907.  
  908.  
  909. %@2@%%@CR:C6A00050002 @%%@AB@%5.1  Copy the Required Files From the Disks%@AE@%%@EH@%%@NL@%
  910.  
  911. Once you have installed the SDK tools, you should determine which sources
  912. you need a nd copy these to the appropriate directory on your hard disk. The
  913. software provided with the DDK is mainly comprised of compressed driver and
  914. virtual device sources. There is no formal installation process for these
  915. files. They can simply be copied from the floppy disks to your hard disk and
  916. then expanded. (See Chapter 6, "Windows 3.0 Device Driver Sources," and
  917. Chapter 7, "Windows 3.0 Virtual Device Sources," in this guide for detailed
  918. descriptions of the sources provided in the DDK.)  %@NL@%
  919.  
  920. Many of the driver source directories are organized into source trees
  921. containing files and subdirectories. They also contain all the software
  922. modules and MAKE and batch files necessary to build the drivers. We
  923. recommend you use the MS-DOS %@AB@%XCOPY%@AE@% command in most cases to ensure you are
  924. copying the directory images just as they are on the disks. Unlike the %@AB@%COPY%@AE@%
  925. command, the %@AB@%XCOPY%@AE@% command can copy all the files contained in the entire
  926. hierarchical file structure of the source disk to the destination disk.  %@NL@%
  927.  
  928. The following is an example showing how to use the %@AB@%XCOPY%@AE@% command and several
  929. of its optional switches:  %@NL@%
  930.  
  931. %@AS@%  XCOPY A:\DISPLAY\1PLANE C:\DISPLAY\1PLANE /s /e /v%@AE@%
  932.  
  933. The %@AB@%/s%@AE@% switch tells %@AB@%XCOPY%@AE@% to copy all the subdirectories. The %@AB@%/e%@AE@% switch
  934. ensures that empty directories get copied. The %@AB@%/v%@AE@% switch is optional but
  935. recommended since it enables you to verify that the files are copied
  936. correctly.  %@NL@%
  937.  
  938. It is important to maintain the directory structure for the provided MAKE
  939. and batch files to work properly. If you change the organization of the
  940. files on your hard disk, be sure to make the appropriate changes to the MAKE
  941. or batch file for building the driver. Notice that a source directory tree
  942. may span across several of the DDK disks. Therefore, be sure to review all
  943. the disks to ensure you have copied all the appropriate files.  %@NL@%
  944.  
  945.  
  946. %@2@%%@CR:C6A00050003 @%%@AB@%5.2  Expand the Compressed Files to Their Normal Size%@AE@%%@EH@%%@NL@%
  947.  
  948. Notice that the files on the disks in the DDK are provided in a compressed
  949. format to conserve disk space. However, they cannot be used in that form.
  950. After the %@AB@%XCOPY%@AE@% command has been used to copy all the disks to your hard
  951. disk, you must expand either all the compressed files or just the files you
  952. need to create the device driver or virtual device you plan to develop.  %@NL@%
  953.  
  954. To convert all the files to their normal size, we have included, in the root
  955. directory of the Device Driver Samples and Tools disk # 1 (1), the following
  956. four files that need to be copied to your hard disk:  %@NL@%
  957.  
  958.  
  959.   ■   TREEEX2.BAT%@NL@%
  960.  
  961.   ■   TREEEX3.BAT%@NL@%
  962.  
  963.   ■   TREEEXP.BAT%@NL@%
  964.  
  965.   ■   WALK.EXE%@NL@%
  966.  
  967.  
  968. After you have copied from the disks the compressed directory that you need,
  969. move to that directory and type the following:  %@NL@%
  970.  
  971. %@AS@%  TREEEXP%@AE@%
  972.  
  973. This batch file will expand to their normal size all the files in the
  974. current directory and any of its subdirectories.  %@NL@%
  975.  
  976.  
  977. %@2@%%@CR:C6A00050004 @%%@AB@%5.3  Other Considerations%@AE@%%@EH@%%@NL@%
  978.  
  979. If you have directories for the 2.0 version tools on your hard disk, be sure
  980. to set your MS-DOS %@AB@%PATH%@AE@% and %@AB@%SET%@AE@% commands to include, instead of or before
  981. the 2.0 directories, all the 3.0 tools, INCLUDE, and library directories.  %@NL@%
  982.  
  983. Also, you need to determine whether you need the device driver sources, the
  984. virtual device sources, or both. For example, if you are writing a printer
  985. driver, you do not need to write a virtual device because access to these
  986. devices is already virtualized at the printer port level in the Virtual
  987. Printer Device. However, if you are writing a display driver you probably
  988. will need them. If your device can be shared among several virtual machines
  989. (VMs) while running under 386 enhanced mode (e.g., if DOS standard
  990. applications can call your device, as well as Windows), then you should
  991. provide a virtual device. Some examples of devices for which we will provide
  992. virtual device support in Windows include the following:  %@NL@%
  993.  
  994.  
  995.   ■   Displays%@NL@%
  996.  
  997.   ■   Printer or parallel ports%@NL@%
  998.  
  999.   ■   Serial ports%@NL@%
  1000.  
  1001.   ■   Keyboards%@NL@%
  1002.  
  1003.   ■   Pointing devices%@NL@%
  1004.  
  1005.   ■   Network API (e.g., NetBIOS)%@NL@%
  1006.  
  1007.   ■   Special hard disks%@NL@%
  1008.  
  1009.   ■   Math co-processors%@NL@%
  1010.  
  1011.  
  1012.  
  1013. %@2@%%@CR:C6A00050005 @%%@AB@%5.4  Checking Your Tools Setup%@AE@%%@EH@%%@NL@%
  1014.  
  1015. To check if you have installed the tools correctly, enter (one at a time)
  1016. the following commands:  %@NL@%
  1017.  
  1018. %@STUB@%    %@AB@%MAKE%@AE@%%@NL@%
  1019.  
  1020. %@STUB@%    %@AB@%LINK%@AE@%%@NL@%
  1021.  
  1022. %@STUB@%    %@AB@%LINK386%@AE@%%@NL@%
  1023.  
  1024. %@STUB@%    %@AB@%RC%@AE@%%@NL@%
  1025.  
  1026. %@STUB@%    %@AB@%MAPSYM%@AE@%%@NL@%
  1027.  
  1028. %@STUB@%    %@AB@%MASM%@AE@%%@NL@%
  1029.  
  1030. %@STUB@%    %@AB@%MASM5%@AE@%%@NL@%
  1031.  
  1032. %@STUB@%    %@AB@%CL%@AE@%%@NL@%
  1033.  
  1034. %@STUB@%    %@AB@%ADDHDR%@AE@%%@NL@%
  1035.  
  1036. After you enter each command, the appropriate version banner for that tool
  1037. should appear on the screen. Ensure that you are using the correct version
  1038. per the following list:  %@NL@%
  1039.  
  1040. %@STUB@%    %@AB@%MAKE %@AE@%(4.07)%@NL@%
  1041.  
  1042. %@STUB@%    %@AB@%LINK%@AE@% (5.10 for C 6.0 or 5.01.21 for C 5.1)%@NL@%
  1043.  
  1044. %@STUB@%    %@AB@%LINK386%@AE@% (1.00.058)%@NL@%
  1045.  
  1046. %@STUB@%    %@AB@%RC%@AE@% (3.0)%@NL@%
  1047.  
  1048. %@STUB@%    %@AB@%MAPSYM%@AE@% (4.11)%@NL@%
  1049.  
  1050. %@STUB@%    %@AB@%MASM%@AE@% (5.10)%@NL@%
  1051.  
  1052. %@STUB@%    %@AB@%MASM5 %@AE@%(5.10B)%@NL@%
  1053.  
  1054. %@STUB@%    %@AB@%CL %@AE@%(6.0 or 5.1)%@NL@%
  1055.  
  1056. %@STUB@%    %@AB@%ADDHDR %@AE@%(1.01)%@NL@%
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063. %@CR:C6A00060001 @%%@1@%%@AB@%Chapter 6  Windows 3.0 Device Driver Sources%@AE@%%@EH@%%@NL@%
  1064. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1065.  
  1066. The following sections contain detailed descriptions of the Microsoft
  1067. Windows 3.0 device driver sources provided in the DDK. The information
  1068. includes where you can find the code on the disks, the procedure for
  1069. building the driver, and the features demonstrated by the code.  %@NL@%
  1070.  
  1071. The sources in this DDK are provided for your development use. You should
  1072. use the sources provided as a code base or as examples of how you should
  1073. structure your driver.  %@NL@%
  1074.  
  1075. The sources are set up in subdirectories on the enclosed disks. You should
  1076. use the MS-DOS %@AB@%COPY%@AE@% or %@AB@%XCOPY%@AE@% command to copy all the files and related
  1077. subdirectories to your hard disk. It is important that you maintain the
  1078. structure as provided on the disks to ensure that the accompanying MAKE and
  1079. batch files work properly. Also, be sure to expand the compressed files to
  1080. their normal size after copying them to your hard disk. See Section 5.2,
  1081. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1082. this.  %@NL@%
  1083.  
  1084. The following table provides a summary of all the source files mentioned in
  1085. this chapter and their locations on the 5.25 inch (or 3.5 inch) DDK Device
  1086. Driver Samples and Tools Disks:  %@NL@%
  1087.  
  1088. %@TH:  79  2556 02 27 12 37 @%Sources for                On disk #   Directory name%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%1-plane displays           1 (2) and   \DISPLAY\1PLANE                           2 (3/4)     4-plane displays           1 (1/2)     \DISPLAY\4PLANE8-plane displays           2 (4) and   \DISPLAY\8PLANE                           3 (5)       CGA grabbers               8 (14)      \GRABBERS\CGAHERC\CGACompaq Plasma              8 (14)      \GRABBERS\CGAHERC\CGAgrabbers                               Hercules grabbers          8 (14)      \GRABBERS\CGAHERC\HERCULESEGA color grabbers         8 (14)      \GRABBERS\EGA\EGACOLOREGA mono grabbers          8 (14)      \GRABBERS\EGA\EGAMONOVGA color grabbers         8 (14)      \GRABBERS\VGA\VGACOLOR8514/a grabbers            8 (14)      \GRABBERS\VGA\VGACOLORVGA mono grabbers          8 (14)      \GRABBERS\VGA\VGAMONOProportional system font   7 (13)      \FONTS\SYSTEMFixed-pitch system font    7 (13)      \FONTS\FIXEDDisplay driver test app    7 (13)      \TESTS\ITE\BIN\DISPTEST.EXEDisplay driver test app    6 (11)      \TESTS\DTA\DTA.EXEDisplay driver test docs   7 (13)      \TESTS\ITE\DOCS\DISPTEST.TXTDisplay driver test docs   6 (11)      \TESTS\DTA\DTA.DOCPCL/HP LaserJet printers   3 (5)       \PRINTERS\HPPCLPrinter Font Installer     4 (7)       \PRINTERS\FINSTALLPFM Editor                 8 (13)      \TOOLS\PFMEDIT.EXEPostScript printers        4 (7)       \PRINTERS\PSCRIPTMKPRN tool                 8 (13)      \TOOLS\MKPRN.EXEEpson printers             5 (8)       \PRINTERS\RASTER\EPSONIBM Color Printer          5 (9)       \PRINTERS\RASTER\COLOR\IBMCOLORPrinter driver test app    7 (12)      \TESTS\ITE\BIN\PRNTTEST.EXEPrinter driver test docs   7 (12)      \TESTS\ITE\DOCS\PRNTTEST.TXTKeyboard drivers           5 (13)      \KEYBOARDMouse drivers              6 (10)      \MOUSECommunications drivers     6 (10)      \COMMSound drivers              6 (10)      \SOUNDMS-Net network driver      5 (9)       \NETNetwork driver test app    7 (12)      \TESTS\NETTEST\BIN\NETTEST.EXENetwork driver test docs   7 (12)      \TESTS\NETTEST\README.TXTHardware compatibility     7 (13)      \TESTS\HCTtest applications                      Hardware compatibility     7 (13)      \TESTS\HCT\README.DOCtest docs                              %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@TE:  79  2556 02 27 12 37 @%
  1089.  
  1090.  
  1091. %@2@%%@CR:C6A00060002 @%%@AB@%6.1  Display Driver Sources%@AE@%%@EH@%%@NL@%
  1092.  
  1093. We are providing 1-, 4-, and 8-plane display driver sources in the DDK on
  1094. the Device Driver Samples and Tools disks. See the table at the beginning of
  1095. this chapter for their exact locations.  %@NL@%
  1096.  
  1097. While many of the display drivers use common code, several drivers compile
  1098. with different switches. Therefore, if you build one display driver and,
  1099. then, want to build a different one, you must delete all the .OBJ files in
  1100. the following directories:  %@NL@%
  1101.  
  1102. %@TH:   7   413 02 31 45 @%1-plane drivers                4-plane drivers%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%\1PLANE                        \4PLANE\1PLANE\BW                     \4PLANE\COLOR\1PLANE\BW\CGAHERC             \4PLANE\COLOR\EGA\1PLANE\BW\EGA%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@TE:   7   413 02 31 45 @%
  1103.  
  1104.  
  1105. %@3@%%@CR:C6A00060003 @%%@AB@%6.1.1  1-Plane Drivers: CGA, EGA Monochrome, EGA High Resolution B&W,%@EH@%
  1106. %@AB@%Hercules, Plasma, and MCGA%@AI@%%@AE@%%@AE@%%@NL@%
  1107.  
  1108. All the above-mentioned drivers are 1-plane drivers. These drivers have been
  1109. modified to run bimodal (in real and protected memory modes), support
  1110. device-independent bitmaps (DIBs), and support greater than (>) 64K fonts.
  1111. They are located on the Device Driver Samples and Tools disks # 1 (2) and 2
  1112. (3/4) under the \DISPLAY\1PLANE directory.  %@NL@%
  1113.  
  1114. These drivers share common code in many areas. Therefore, you need to copy
  1115. all the files in the directory structure to your hard disk. We suggest you
  1116. use the MS-DOS %@AB@%XCOPY%@AE@% command to do this. Also, be sure to expand the
  1117. compressed files to their normal size after copying them to your hard disk.
  1118. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1119. details on how to do this.  %@NL@%
  1120.  
  1121. You need to change to the appropriate subdirectory for the driver you want
  1122. to build. Each driver directory has a MAKEIT.BAT batch file to build the
  1123. driver. You will find a batch file for each driver under the following
  1124. pathnames:  %@NL@%
  1125.  
  1126. %@TH:  15   664 02 34 44 @%Driver                            Location%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CGA                               \DISPLAY\1PLANE\BW\CGAHERC\CGA\ AKEIT.BATCompaq Plasma                     \DISPLAY\1PLANE\BW\CGAHERC\COMPAQ                                  \MAKEIT.BATHercules mono                     \DISPLAY\1PLANE\BW\CGAHERC\HERC\MAKEIT.BATEGA hi res B&W                    \DISPLAY\1PLANE\BW\EGA\EGAHIBW\MAKEIT.BATEGA mono                          \DISPLAY\1PLANE\BW\EGA\EGAMONO\MAKEIT.BATMCGA (VGAmono)                    \DISPLAY\1PLANE\BW\EGA\MCGA\MAKEIT.BAT%@TE:  15   664 02 34 44 @%
  1127.  
  1128. If your 1-plane display device is based on the CGA, EGA, or Hercules
  1129. standard, you should base your driver code on one of these drivers.
  1130. Otherwise, these sources can provide you with the sample code necessary for
  1131. you to design and plan for a new 1-plane driver.  %@NL@%
  1132.  
  1133.  
  1134. %@3@%%@CR:C6A00060004 @%%@AB@%6.1.2  4-Plane Drivers: EGA and VGA%@AE@%%@EH@%%@NL@%
  1135.  
  1136. Both the EGA and VGA driver sources use all 4 planes to support 16 colors.
  1137. These drivers have been modified to run bimodal (in real and protected
  1138. memory modes), support device-independent bitmaps (DIBs), and support
  1139. greater than (>) 64K fonts. They are located on the Device Driver Samples
  1140. and Tools disk # 1 (1/2) under the \DISPLAY\4PLANE directory.  %@NL@%
  1141.  
  1142. You may also find samples of IFDEF palette management code in these sources.
  1143. However, we recommend that you do not follow these examples. See the
  1144. following section on 8-plane VGA drivers for more complete information on
  1145. sample sources with palette management support.  %@NL@%
  1146.  
  1147. These drivers share common code in many areas. Therefore, you need to copy
  1148. all the files in the directory structure to your hard disk. We suggest you
  1149. use the MS-DOS %@AB@%XCOPY%@AE@% command to do this. Also, be sure to expand the
  1150. compressed files to their normal size after copying them to your hard disk.
  1151. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1152. details on how to do this.  %@NL@%
  1153.  
  1154. You need to change to the appropriate subdirectory for either the VGA or EGA
  1155. driver and execute the MAKEIT.BAT batch file to build the driver. You will
  1156. find a batch file for each driver under the following pathnames:  %@NL@%
  1157.  
  1158. %@TH:   4   282 02 21 55 @%Driver               Location%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%EGA hi res color     \DISPLAY\4PLANE\COLOR\EGA\EGAHIRES\MAKEIT.BATVGA                  \DISPLAY\4PLANE\COLOR\EGA\VGA\MAKEIT.BAT%@TE:   4   282 02 21 55 @%
  1159.  
  1160. If your 4-plane display device is based on either the EGA or VGA standard,
  1161. you should base your driver code on the appropriate driver. Otherwise, these
  1162. sources can provide you with the sample code necessary for you to design and
  1163. plan for a new 4-plane driver.  %@NL@%
  1164.  
  1165.  
  1166. %@3@%%@CR:C6A00060005 @%%@AB@%6.1.3  8-Plane Drivers: Video Seven VGA and 8514/a%@AI@%%@AE@%%@AE@%%@EH@%%@NL@%
  1167.  
  1168. We have provided you with sources for the Video Seven VGA and the 8514/a
  1169. drivers. These drivers use all 8 planes available on the adapter for 256
  1170. color support. The code provides a good example of the use of color-palette
  1171. management and device-independent bitmaps (DIBs). These drivers have been
  1172. adapted to run bimodal and support >64K fonts. Both driver sources can be
  1173. used as examples of how a packed-pixel driver is implemented under Windows.
  1174. %@NL@%
  1175.  
  1176. To demonstrate the use of DIBs and color-palette management in these
  1177. drivers, you can run the sample application, SHOWDIB, provided in the SDK.  %@NL@%
  1178.  
  1179. You will find these sources on the Device Driver Samples and Tools disks # 2
  1180. (4) and 3 (5) under the \DISPLAY\8PLANE (\V7 or \8514) directory. You need
  1181. to copy all the files in the appropriate directory structure to your hard
  1182. disk. These two drivers do %@AI@%not%@AE@% share any common code, so you must choose one
  1183. or both depending on your needs. Use the MS-DOS %@AB@%XCOPY%@AE@% command to do this.
  1184. Also, be sure to expand the compressed files to their normal size after
  1185. copying them to your hard disk. See Section 5.2, "Expand the Compressed
  1186. Files to Their Normal Size," for details on how to do this.  %@NL@%
  1187.  
  1188. Notice that the \8PLANE\V7 directory contains an empty subdirectory called
  1189. \DEBUG. The \8PLANE\8514 directory also has an empty \OBJ subdirectory. You
  1190. must have these subdirectories available when you build the driver,
  1191. otherwise the MAKE files will fail.  %@NL@%
  1192.  
  1193. You need to change to the appropriate subdirectory for the driver you want
  1194. to build. You will find a batch file for the Video Seven VGA driver under
  1195. the following pathname:  %@NL@%
  1196.  
  1197. %@STUB@%    \DISPLAY\8PLANE\V7\MKP.BAT%@NL@%
  1198.  
  1199. This will build the V7VGA.DRV file into the \DEBUG subdirectory.  %@NL@%
  1200.  
  1201. For the 8514/a driver, change to the following subdirectory
  1202. (\DISPLAY\8PLANE\8514\SOURCE) and then type:  %@NL@%
  1203.  
  1204. %@STUB@%    MAKE DRIVER%@NL@%
  1205.  
  1206. This will build the 8514.DRV file into the \OBJ subdirectory.  %@NL@%
  1207.  
  1208.  
  1209. %@3@%%@CR:C6A00060006 @%%@AB@%6.1.4  Windows Real and Standard Mode Grabbers%@AE@%%@EH@%%@NL@%
  1210.  
  1211. The Windows real and standard mode grabbers are on the Device Driver Samples
  1212. and Tools disk # 8 (14) under the \GRABBERS directory. Since much of the
  1213. grabber code for different displays is common, you should copy the \GRABBERS
  1214. sub-directory in its entirety to your hard disk. Also, be sure to expand the
  1215. compressed files to their normal size after copying them to your hard disk.
  1216. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1217. details on how to do this.  %@NL@%
  1218.  
  1219. The individual grabbers are in the following directories:  %@NL@%
  1220.  
  1221. %@TH:   8   481 02 30 46 @%Grabber                       Location%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CGA and Compaq Plasma         \GRABBERS\CGAHERC\CGAHercules                      \GRABBERS\CGAHERC\HERCULESEGA color                     \GRABBERS\EGA\EGACOLOREGA mono                      \GRABBERS\EGA\EGAMONOVGA color and 8514/a          \GRABBERS\VGA\VGACOLORVGA mono (MCGA)               \GRABBERS\VGA\VGAMONO%@TE:   8   481 02 30 46 @%
  1222.  
  1223. After changing to the appropriate subdirectory, use the MAKE files provided
  1224. in each of these directories to build the grabber by typing:  %@NL@%
  1225.  
  1226. %@STUB@%    MAKE %@AI@%grabbername%@AE@%%@NL@%
  1227.  
  1228.  
  1229. %@3@%%@CR:C6A00060007 @%%@AB@%6.1.5  System Font Sources%@AE@%%@EH@%%@NL@%
  1230.  
  1231. We have provided both the new Windows 3.0 proportional system font and the
  1232. old Windows 2.0 fixed-pitch system font. If your display driver supports
  1233. resolutions other than the display resolutions provided in Windows, you may
  1234. need to modify the system fonts for your display.  %@NL@%
  1235.  
  1236. You will need to copy the \FONTS directory to your hard disk in its
  1237. entirety. Use the MS-DOS %@AB@%XCOPY%@AE@% command to do this. You will find this
  1238. directory on the Device Driver Samples and Tools disk # 7 (13). Also, be
  1239. sure to expand the compressed files to their normal size after copying them
  1240. to your hard disk. See Section 5.2, "Expand the Compressed Files to Their
  1241. Normal Size," for details on how to do this.  %@NL@%
  1242.  
  1243. The Windows 3.0 proportional system fonts are hand tuned for the screen and
  1244. match the Adobe font widths for their Helv font. If you need to adapt the
  1245. system font for a display with a different horizontal resolution than the
  1246. ones supported by these fonts, you will need to adjust the font widths
  1247. accordingly. This ensures that the character will do the best "copy fit" of
  1248. the printed character with those on the screen. To modify these (.FNT) files
  1249. before building the .FON file, use the Font Editor tool provided with the
  1250. SDK.  %@NL@%
  1251.  
  1252. Before you build any fonts, you must make the FONTS.OBJ file, which you can
  1253. do by running the following once from the \FONTS directory:  %@NL@%
  1254.  
  1255. %@STUB@%    MASM FONTS;%@NL@%
  1256.  
  1257. You can easily build the proportional system font files by executing the
  1258. MAKE file from the \FONTS\SYSTEM directory:  %@NL@%
  1259.  
  1260. %@STUB@%    MAKE SYSTEM%@NL@%
  1261.  
  1262. The font filenames for the new proportional system fonts are as follows:  %@NL@%
  1263.  
  1264. %@TH:   6   351 02 18 58 @%Filename          Resolution%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CGASYS.FON        (640 x 200) CGA EGASYS.FON        (640 x 350) EGA high resVGASYS.FON        (640 x 480) VGA (square pixels, 96 dpi)8514SYS.FON       (1024 x 768) 8514/a (square pixels, 120 dpi)%@TE:   6   351 02 18 58 @%
  1265.  
  1266. In addition to the new Windows 3.0 proportional system font, the Windows 2.0
  1267. fixed-pitch system font is necessary for older Windows applications running
  1268. under Windows 3.0. All Windows applications that are not "marked" to run
  1269. with the new proportional font, or that were not developed as a Windows 3.0
  1270. application, will be given the fixed-pitch font for  displaying text in
  1271. dialog and message boxes and in the client area.  %@NL@%
  1272.  
  1273. Since Windows 3.0 supports both of these files, it may be necessary for you
  1274. to also modify the appropriate fixed-pitch system font.  %@NL@%
  1275.  
  1276. You will find these fonts, as well as the terminal (OEM) fixed-pitch fonts,
  1277. in the \FONTS\FIXED directory. Execute from this directory the MAKE file
  1278. called FIXED by running:  %@NL@%
  1279.  
  1280. %@STUB@%    MAKE FIXED%@NL@%
  1281.  
  1282. The font filenames for the Windows 2.0 fixed-pitch system and terminal (OEM)
  1283. fonts are as follows:  %@NL@%
  1284.  
  1285. %@TH:  15   840 02 18 58 @%Filename          Resolution%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CGAFIX.FON        (640 x 200) CGA CGAOEM.FON        (640 x 200) CGA EGAFIX.FON        (640 x 350) EGA high resEGAOEM.FON        (640 x 350) EGA high resVGAFIX.FON        (640 x 480) VGA (square pixels, 96 dpi)VGAOEM.FON        (640 x 480) VGA (square pixels, 96 dpi)VGA850.FON        (640 x 480) VGA (square pixels, 96 dpi)VGA860.FON        (640 x 480) VGA (square pixels, 96 dpi)VGA861.FON        (640 x 480) VGA (square pixels, 96 dpi)VGA863.FON        (640 x 480) VGA (square pixels, 96 dpi)VGA865.FON        (640 x 480) VGA (square pixels, 96 dpi)8514FIX.FON       (1024 x 768) 8514/a (square pixels, 120 dpi)8515OEM.FON       (1024 x 768) 8514/a (square pixels, 120 dpi)%@TE:  15   840 02 18 58 @%
  1286.  
  1287. If you want to build both the system proportional and fixed fonts at the
  1288. same time, you can run the MAKE file called FONTS from the \FONTS directory.
  1289. %@NL@%
  1290.  
  1291.  
  1292. %@2@%%@CR:C6A00060008 @%%@AB@%6.2  Display Driver Test Applications%@AE@%%@EH@%%@NL@%
  1293.  
  1294. The DDK now contains a display driver test application. You will find the
  1295. complete documentation, program executable, and source to this test under
  1296. the \TESTS\ITE directory on the Device Driver Samples and Tools disk # 7
  1297. (13). The program is called DISPTEST.EXE and is in the \TESTS\ITE\BIN
  1298. subdirectory. The documentation for running the program is in
  1299. \TESTS\ITE\DOCS\DISPTEST.TXT.  %@NL@%
  1300.  
  1301. The sources have been provided to aid in your debugging should you find a
  1302. problem while running the display test program. If you need to build this
  1303. program for some reason, you should follow the instructions in the
  1304. README.TXT file under the \TESTS\ITE directory.  %@NL@%
  1305.  
  1306. A more comprehensive display driver test application called DTA.EXE is also
  1307. included and can be found under \TESTS\DTA on the Device Driver Samples and
  1308. Tools disk # 6 (11). The documentation for running it is in
  1309. \TESTS\DTA\DTA.DOC.  %@NL@%
  1310.  
  1311.  
  1312. %@2@%%@CR:C6A00060009 @%%@AB@%6.3  Printer Driver Sources%@AE@%%@EH@%%@NL@%
  1313.  
  1314. We are providing driver sources for our PCL/HP LaserJet and PostScript
  1315. printer drivers. In addition, sample sources for dot-matrix black/white and
  1316. color raster printers are also included. All of these sample sources provide
  1317. full support for Windows 3.0 features.  %@NL@%
  1318.  
  1319. After copying all the appropriate files to your hard disk with the MS-DOS
  1320. %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command, be sure to expand the compressed files to their
  1321. normal size. See Section 5.2, "Expand the Compressed Files to Their Normal
  1322. Size," for details on how to do this.  %@NL@%
  1323.  
  1324.  
  1325. %@3@%%@CR:C6A00060010 @%%@AB@%6.3.1  PCL/HP LaserJet Printer Driver%@AI@%%@AE@%%@AE@%%@EH@%%@NL@%
  1326.  
  1327. The PCL/HP LaserJet printer driver sources are being provided as examples
  1328. for using the new device initialization APIs, the Printer Font Installer,
  1329. the new Windows 3.0 controls in the printer dialog box, and the new Help
  1330. Manager. The two new APIs (%@AB@%ExtDeviceMode()%@AE@% and %@AB@%DeviceCapabilities()%@AE@%) for
  1331. device initialization are documented in the DDK in Chapter 5, "Printer
  1332. Drivers," of the %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@%.  %@NL@%
  1333.  
  1334. The device-mode dialog box should be used as an example for designing a
  1335. driver dialog box interface only for Windows 3.0. The design should follow
  1336. the guidelines described in the %@AI@%Systems Application Architecture, Common
  1337. %@AI@%User Access: Advanced Interface Design Guide%@AE@%. If this dialog box offers the
  1338. user any options, some mechanism should be included to enable the user to
  1339. access online help. How to use the Windows 3.0 Help Engine is described in
  1340. the %@AI@%Microsoft Windows Software Development Kit%@AE@%.  %@NL@%
  1341.  
  1342. The PCL/HP LaserJet core driver sources are on the Device Driver Samples and
  1343. Tools disk # 3 (5) under the \PRINTERS\HPPCL directory. The \HPPCL directory
  1344. contains subdirectories necessary for building the driver. You can build the
  1345. driver by running the MAKEIT.BAT batch file from the \HPPCL directory.  %@NL@%
  1346.  
  1347. Included in the DDK documentation set is the %@AI@%Microsoft Windows Printers and
  1348. %@AI@%Fonts Kit%@AE@%. You should review this document for information on font support
  1349. under the PCL/HP LaserJet printer driver and for new features that have been
  1350. incorporated into this version of the driver. For example, the Soft Font
  1351. Installer has been removed from the core driver and placed into a separate
  1352. dynamic-link library (DLL). It will install font information for both soft
  1353. and cartridge fonts. A new source tree was created for the installer (now
  1354. called the Printer Font Installer).  %@NL@%
  1355.  
  1356. The Printer Font Installer source is on the Device Driver Samples and Tools
  1357. disk # 4 (7) under the \PRINTERS\FINSTALL directory. You can build the font
  1358. installer by running the MAKEIT.BAT file from the \FINSTALL directory. This
  1359. module is called by selecting the "Fonts..." button in the HPPCL driver
  1360. dialog box.  %@NL@%
  1361.  
  1362. The Printer Font Metrics (PFM) Editor (PFMEDIT.EXE), also documented in the
  1363. %@AI@%Microsoft Windows Printers and Fonts Kit%@AE@%, is provided on the Device Driver
  1364. Samples and Tools disk # 8 (13) under the \TOOLS directory.  %@NL@%
  1365.  
  1366.  
  1367. %@3@%%@CR:C6A00060011 @%%@AB@%6.3.2  PostScript Printer Driver%@AE@%%@EH@%%@NL@%
  1368.  
  1369. The PostScript printer driver is also a good example of how to use the new
  1370. device initialization APIs (%@AB@%ExtDeviceMode()%@AE@% and %@AB@%DeviceCapabilities()%@AE@%), the
  1371. new Windows 3.0 controls, and the Help Manager. It can also provide an
  1372. example of Windows support for vector devices such as plotters.  %@NL@%
  1373.  
  1374. Notice that the device-mode interface between the PCL/HP LaserJet driver and
  1375. the PostScript driver are consistent wherever possible. These sources also
  1376. serve as an example of the new and updated escapes documented in Chapter 11,
  1377. "Device Driver Escapes," of the %@AI@%Microsoft Windows Device Driver Adaptation
  1378. %@AI@%Guide%@AE@%.  %@NL@%
  1379.  
  1380. This version of the driver provides RGB color PostScript support. Percent
  1381. scaling has also been added to the driver. The user can specify the scale of
  1382. the output to be printed in the printable area of the page.  %@NL@%
  1383.  
  1384. Device-independent color bitmaps (DIBs) are supported directly in the
  1385. driver. This is a good example of how you can support this Windows 3.0
  1386. feature on color printer devices. For more information on DIBs, see Chapter
  1387. 3, "Display Drivers: New Features," in the %@AI@%Microsoft Windows Device Driver
  1388. %@AI@%Adaptation Guide.%@AE@%  %@NL@%
  1389.  
  1390. The option to change the Graphics Resolution has been removed from the
  1391. device-mode dialog interface. Under Windows 3.0, %@AB@%StretchBlt()%@AE@% is implemented
  1392. at the driver level. Therefore, the need to change the device resolution to
  1393. speed up bitmap output is no longer needed. See Chapter 10, "Common
  1394. Functions," in the %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@% for more
  1395. information on the %@AB@%StretchBlt()%@AE@% enhancements. An example of its use is in
  1396. the PostScript driver source file STRCHBLT.C.  %@NL@%
  1397.  
  1398. Another new GDI device driver function for scaling DIBs is the
  1399. %@AB@%StretchDIBits()%@AE@% function. See Chapter 3, "Display Drivers: New Features,"
  1400. for more information on this and other DIBs functions. An example of its use
  1401. is in the PostScript driver source file DIBTODEV.C.  %@NL@%
  1402.  
  1403. The driver sources are on the Device Driver Samples and Tools disk # 8 (13)
  1404. under the \PRINTERS\PSCRIPT directory. A batch file is provided to build the
  1405. driver called MAKEPS33.BAT.  %@NL@%
  1406.  
  1407. The PostScript printer driver has been modified to make it easier to add new
  1408. device support, without modifying the source files. The DDK provides a tool
  1409. called MKPRN.EXE, which is located on the Device Driver Samples and Tools
  1410. disk # 8 (13) under the \TOOLS directory. Use this tool to compile
  1411. PostScript Printer Description (PPD) files into Windows Printer Description
  1412. (WPD) files. You can then install .WPD files for the PostScript driver by
  1413. choosing the "Add Printer" option in the driver's dialog box. Once
  1414. installed, the device will be selectable from the list of printers in the
  1415. driver. See the %@AI@%Microsoft Windows Printers and Fonts Kit%@AE@% for more
  1416. information on this tool.  %@NL@%
  1417.  
  1418.  
  1419. %@3@%%@CR:C6A00060012 @%%@AB@%6.3.3  Raster Driver Sample Sources%@AE@%%@EH@%%@NL@%
  1420.  
  1421. Also included in this kit are sample sources for an older version Epson
  1422. 9-pin printer and an IBM Color Printer driver. These samples have been
  1423. updated from the original 2.x samples to reflect the new 3.0 feature support
  1424. for device initialization and an enhanced printer dialog box interface.  %@NL@%
  1425.  
  1426. The IBM Color Printer driver sources provide an example of supporting
  1427. 3-plane color bitmaps with a color library. This library may be linked to
  1428. your driver, or you may still choose to implement a different method for
  1429. supporting color on your device.  %@NL@%
  1430.  
  1431. The files are on the Device Driver Samples and Tools disks # 5 (8 / 9) under
  1432. the \PRINTERS\RASTER directory. To build the IBM Color Printer driver, you
  1433. need to run the batch file under the \PRINTERS\RASTER\COLOR\IBMCOLOR
  1434. directory:  %@NL@%
  1435.  
  1436. %@STUB@%    MAKEIT.BAT%@NL@%
  1437.  
  1438. To build the Epson printer driver, you need to run the MAKE file under the
  1439. \PRINTERS\RASTER\EPSON directory:  %@NL@%
  1440.  
  1441. %@STUB@%    MAKE EPSON%@NL@%
  1442.  
  1443. These raster driver sources should provide you with a good example for
  1444. implementing dot-matrix, ink-jet, and other raster device driver support.  %@NL@%
  1445.  
  1446.  
  1447. %@2@%%@CR:C6A00060013 @%%@AB@%6.4  Printer Driver Test Applications%@AE@%%@EH@%%@NL@%
  1448.  
  1449. The DDK includes a printer driver test application. You will find the
  1450. complete documentation, program executable, and source to this test under
  1451. the \TESTS\ITE directory on the Device Driver Samples and Tools disk # 7
  1452. (12). The program is called PRNTTEST.EXE and is in the \TESTS\ITE\BIN
  1453. subdirectory. The documentation for running the program is in
  1454. \TESTS\ITE\DOCS\PRNTTEST.TXT.  %@NL@%
  1455.  
  1456. The sources have been provided to aid in your debugging should you find a
  1457. problem while running the printer test program. If you need to build this
  1458. program for some reason, you should follow the instructions in the
  1459. README.TXT file under the \TESTS\ITE directory.  %@NL@%
  1460.  
  1461. Additional test files have also been provided for printing from various
  1462. Windows applications. You will find the documentation, along with the source
  1463. files for these tests, under the \TESTS\PRINT directory on the Device Driver
  1464. Samples and Tools disk # 6 (12).  %@NL@%
  1465.  
  1466.  
  1467. %@2@%%@CR:C6A00060014 @%%@AB@%6.5  Keyboard Driver Sources%@AE@%%@EH@%%@NL@%
  1468.  
  1469. The keyboard driver structure has been changed substantially since Windows
  1470. 2.x. If you currently have a Windows 2.x driver, you will need to rewrite
  1471. the driver to the new structure. We suggest you start your development with
  1472. the sources provided in this kit, adding support for your specific keyboard
  1473. where appropriate.  %@NL@%
  1474.  
  1475. The new keyboard sources are on the Device Driver Samples and Tools disk # 5
  1476. (13) under the \KEYBOARD directory. Copy all the files to your hard disk
  1477. with the MS_DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the
  1478. compressed files to their normal size after copying them to your hard disk.
  1479. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1480. details on how to do this.  %@NL@%
  1481.  
  1482. This driver also requires the INCLUDE file INT31.INC. You will need to copy
  1483. (and expand) this file from the \INCLUDE directory on the Virtual Device
  1484. Samples and Tools disk # 1 (1). Make sure this file is in your INCLUDE path.
  1485. %@NL@%
  1486.  
  1487. There is a batch file provided to build the IBM-style keyboard driver and
  1488. all the international tables for foreign keyboards. To build the drivers,
  1489. you need to run the MAKEKEYB.BAT batch file in the \KEYBOARD directory.  %@NL@%
  1490.  
  1491.  
  1492. %@2@%%@CR:C6A00060015 @%%@AB@%6.6  Mouse Driver Sources%@AE@%%@EH@%%@NL@%
  1493.  
  1494. The mouse driver has few changes from the version shipped with the Windows
  1495. 2.1 DDK. The driver was only modified to run correctly in the protected-mode
  1496. memory model.  %@NL@%
  1497.  
  1498. The Microsoft Mouse (or Microsoft Mouse-compatible) driver sources are on
  1499. the Device Driver Samples and Tools disk # 6 (10). Copy all the files from
  1500. the \MOUSE directory to your hard disk with the MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@%
  1501. command. Also, be sure to expand the compressed files to their normal size
  1502. after copying them to your hard disk. See Section 5.2, "Expand the
  1503. Compressed Files to Their Normal Size," for details on how to do this.  %@NL@%
  1504.  
  1505. To build the driver, run the following:  %@NL@%
  1506.  
  1507. %@STUB@%    MAKE MOUSE%@NL@%
  1508.  
  1509.  
  1510. %@2@%%@CR:C6A00060016 @%%@AB@%6.7  COMM Driver Sources%@AE@%%@EH@%%@NL@%
  1511.  
  1512. This driver has been enhanced to support COM1 through COM4 and dual-mode
  1513. execution with Windows 3.0.  %@NL@%
  1514.  
  1515. The COMM driver sources are on the Device Driver Samples and Tools disk # 6
  1516. (10). Copy all the files from the \COMM directory to your hard disk with the
  1517. MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the compressed files
  1518. to their normal size after copying them to your hard disk. See Section 5.2,
  1519. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1520. this.  %@NL@%
  1521.  
  1522. This driver also requires the INCLUDE file INT31.INC. You will need to copy
  1523. (and expand) this file from the \INCLUDE directory on the Virtual Device
  1524. Samples and Tools disk # 1 (1). Make sure this file is in your INCLUDE path.
  1525. %@NL@%
  1526.  
  1527. To build the driver, run the following:  %@NL@%
  1528.  
  1529. %@STUB@%    MAKE COMM%@NL@%
  1530.  
  1531.  
  1532. %@2@%%@CR:C6A00060017 @%%@AB@%6.8  Sound Driver Sources%@AE@%%@EH@%%@NL@%
  1533.  
  1534. The sound driver has few changes from the version shipped with the Windows
  1535. 2.1 DDK. The driver was only modified to run correctly in the protected-mode
  1536. memory model.  %@NL@%
  1537.  
  1538. The sound driver sources are on the Device Driver Samples and Tools disk # 6
  1539. (10). Copy all the files from the \SOUND directory to your hard disk with
  1540. the MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the compressed
  1541. files to their normal size after copying them to your hard disk. See Section
  1542. 5.2, "Expand the Compressed Files to Their Normal Size," for details on how
  1543. to do this.  %@NL@%
  1544.  
  1545. To build the driver, run the following:  %@NL@%
  1546.  
  1547. %@STUB@%    MAKE SOUND%@NL@%
  1548.  
  1549.  
  1550. %@2@%%@CR:C6A00060018 @%%@AB@%6.9  Network Driver Sources%@AE@%%@EH@%%@NL@%
  1551.  
  1552. These network driver sources are new for Windows 3.0 and enable the Windows
  1553. File Manager, Print Manager, and Control Panel to perform network functions
  1554. such as connecting to network drivers.  %@NL@%
  1555.  
  1556. The MS-Net network driver sources are on the Device Driver Samples and Tools
  1557. disk # 5 (9). Copy all the files from the \NET directory to your hard disk
  1558. with the MS-DOS %@AB@%XCOPY%@AE@% or %@AB@%COPY%@AE@% command. Also, be sure to expand the
  1559. compressed files to their normal size after copying them to your hard disk.
  1560. See Section 5.2, "Expand the Compressed Files to Their Normal Size," for
  1561. details on how to do this.  %@NL@%
  1562.  
  1563. To build the driver, run the following:  %@NL@%
  1564.  
  1565. %@STUB@%    MAKE MSNET%@NL@%
  1566.  
  1567.  
  1568. %@2@%%@CR:C6A00060019 @%%@AB@%6.10  Network Driver and HCT Test Applications%@AE@%%@EH@%%@NL@%
  1569.  
  1570. The DDK includes a network driver test application. You will find the
  1571. documentation, program executable, and source for this test under the
  1572. \TESTS\NETTEST directory on the Device Driver Samples and Tools disk # 7
  1573. (12). The program is called NETTEST.EXE and is in the \TESTS\NETTEST\BIN
  1574. subdirectory.  %@NL@%
  1575.  
  1576. The sources have been provided to aid in your debugging should you find a
  1577. problem while running the network test program. If you need to build this
  1578. program for some reason or need documentation for running the program, you
  1579. should follow the instructions in the README.TXT file under the
  1580. \TESTS\NETTEST directory.  %@NL@%
  1581.  
  1582. The DDK also includes a hardware compatibility test application. This test
  1583. suite contains a series of testing components that will help to verify that
  1584. your hardware is compatible with Windows 3.0. You will find the
  1585. documentation, program executables, and sources for these tests under the
  1586. \TESTS\HCT directory on the Device Driver Samples and Tools disk # 7 (13).
  1587. The documentation for running the program is in \TESTS\HCT\README.DOC.  %@NL@%
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594. %@CR:C6A00070001 @%%@1@%%@AB@%Chapter 7  Windows 3.0 Virtual Device Sources%@AE@%%@EH@%%@NL@%
  1595. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1596.  
  1597. These virtual device sources are provided to you to begin development for
  1598. Windows 3.0 386 enhanced mode virtual device support. Each source directory
  1599. contains one or more .ASM source files, a .DEF file, and two MAKE files. The
  1600. first MAKE file is usually called MAKEFILE (or MAKEVGA for the VGA VDD) and
  1601. is used with Microsoft NMAKE or with other Unix-style MAKE utilities. The
  1602. second one, called by the name of the file being produced (e.g., VPD), is
  1603. used with the standard Microsoft MAKE utility. You can use either MAKE file
  1604. to produce virtual devices. Notice, however, that NMAKE is not provided in
  1605. the DDK. It is included, though, with some Microsoft language products, such
  1606. as Microsoft C Professional Development System version 6.0.  %@NL@%
  1607.  
  1608. These MAKE files offer examples of the proper use of the tools and options,
  1609. and of the general build procedures that should be followed in developing
  1610. virtual devices. Also, be sure to expand the compressed files to their
  1611. normal size after copying them to your hard disk. See Section 5.2, "Expand
  1612. the Compressed Files to Their Normal Size," for details on how to do this.  %@NL@%
  1613.  
  1614. Notice that, if you encounter random results or problems when building these
  1615. virtual devices, it may be due to a low-memory situation. This can be
  1616. resolved by creating more memory for your system by removing such things as
  1617. TSRs and Network software.  %@NL@%
  1618.  
  1619. The following table provides a summary of all the source files mentioned in
  1620. this chapter and their locations on the 5.25 inch (or 3.5 inch) DDK Virtual
  1621. Device Samples and Tools disks:  %@NL@%
  1622.  
  1623. %@TH:  29  1392 02 24 11 41 @%Sources for             On disk #  Directory name%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CGA displays            1 (2)      \VDDCGACompaq Plasma           1 (2)      \VDDCGAEGA displays            1 (2)      \VDDEGAVGA displays            1 (2)      \VDDEGA8514/a display          1 (2)      \VDDEGAHercules display        1 (2)      \VDDHERCCGA grabbers            2 (3)      \GRABBERSEGA grabbers            2 (3)      \GRABBERSVGA grabbers            2 (3)      \GRABBERS8514/a grabbers         2 (3)      \GRABBERSHercules grabbers       2 (3)      \GRABBERSATT/Compaq grabbers     2 (3)      \GRABBERSGrabber font files      2 (3)      \OEMFONTSDMA devices             1 (2)      \VDMADEBIOS devices           1 (1)      \EBIOSHard Disk devices       1 (2)      \VHDKeyboard devices        1 (2)      \VKDMouse devices           2 (2)      \VMDNetBIOS devices         2 (3)      \VNETBIOSDOS network devices     2 (3)      \LDOSNETROM BIOS devices        2 (3)      \BIOSXLATPaging devices          1 (1)      \PAGESWAPPrinter devices         2 (3)      \VPDCommunications devices  2 (2)      \VCDCOM Buffer devices      2 (2)      \COMBUFFFloppy drive devices    2 (2)      \VFD%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@TE:  29  1392 02 24 11 41 @%
  1624.  
  1625.  
  1626. %@2@%%@CR:C6A00070002 @%%@AB@%7.1  The Display Devices (CGA, EGA, VGA, 8514/a, HERC)%@AE@%%@EH@%%@NL@%
  1627.  
  1628. This device virtualizes the video display and is the most complex of the
  1629. devices supplied in the DDK.  %@NL@%
  1630.  
  1631. The various VDD sources are on the Virtual Device Samples and Tools disks
  1632. under the directories \VDDCGA, \VDDEGA and \VDDHERC. See the table at the
  1633. beginning of this chapter for a complete list of all the sources and their
  1634. locations. Be sure to expand the compressed files to their normal size after
  1635. copying them to your hard disk. See Section 5.2, "Expand the Compressed
  1636. Files to Their Normal Size," for details on how to do this.  %@NL@%
  1637.  
  1638. The \VDDCGA source tree only contains files to build the CGA VDD. This VDD
  1639. also provides support for the Compaq Plasma display, which is sometimes
  1640. called IDC.  %@NL@%
  1641.  
  1642. The \VDDEGA source tree uses conditional assembly to build three separate
  1643. virtual devices to handle EGA, VGA, and 8514/a video adapters.  %@NL@%
  1644.  
  1645. The \VDDHERC source tree only contains files to build the Hercules VDD.  %@NL@%
  1646.  
  1647. You will find different MAKE files for each of the VDDs in their appropriate
  1648. directories. The following is a list of the MAKE filenames (for NMAKE and
  1649. DOS MAKE) for each VDD:  %@NL@%
  1650.  
  1651. %@TH:   7   292 02 10 10 56 @%Adapter   NMAKE     DOS MAKE%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CGA/IDC   MAKEFILE  VDDCGAEGA       MAKEEGA   VDDEGAVGA       MAKEVGA   VDDVGA8514/a    MAKE8514  VDD8514Hercules  MAKEFILE  VDDHERC%@TE:   7   292 02 10 10 56 @%
  1652.  
  1653. Notice that, if you are using NMAKE, you may need to rename the appropriate
  1654. NMAKE filename to "MAKEFILE." Some versions of NMAKE always use the
  1655. "MAKEFILE" filename.  %@NL@%
  1656.  
  1657. The EGA, VGA, and 8514/a VDDs all share common code but compile with
  1658. different switches. Therefore, if you build one VDD and, then, want to build
  1659. a different one, you must delete all the .OBJ files in the VDDEGA directory.
  1660. %@NL@%
  1661.  
  1662.  
  1663. %@2@%%@CR:C6A00070003 @%%@AB@%7.2  The Display/Windows Interface (GRABBER)%@AE@%%@EH@%%@NL@%
  1664.  
  1665. The grabbers for 386 enhanced mode are different from those used when
  1666. running in real or standard mode. These are responsible for rendering a
  1667. virtual machine's display context within a window. Therefore, they are
  1668. closely bound with the virtual display device (VDD). Each VDD needs to be
  1669. accompanied by its own grabber as a linked pair.  %@NL@%
  1670.  
  1671. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  1672. the \GRABBERS directory structure. Be sure to expand the compressed files to
  1673. their normal size after copying them to your hard disk. See Section 5.2,
  1674. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1675. this.  %@NL@%
  1676.  
  1677. The DDK contains sources for CGA, EGA, VGA, 8514/a, Compaq Plasma, and
  1678. Hercules grabbers. Since they are all built in the same directory, different
  1679. MAKE files are provided for each. The following is a list of the MAKE
  1680. filenames (for NMAKE and DOS MAKE) for each grabber:  %@NL@%
  1681.  
  1682. %@TH:   8   355 02 15 10 51 @%Adapter        NMAKE     DOS MAKE%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CGA            MAKECGA   CGAGRBEGA            MAKEFILE  EGAGRBVGA            MAKEVGA   VGAGRB8514/a         MAKE8514  8514GRBHercules       MAKEHERC  HERCGRBATT(R)/Compaq  MAKEPLSM  PLSMGRB%@TE:   8   355 02 15 10 51 @%
  1683.  
  1684. Notice that, if you are using NMAKE, you may need to rename the appropriate
  1685. NMAKE file to "MAKEFILE." Some versions of NMAKE always use the "MAKEFILE"
  1686. filename.  %@NL@%
  1687.  
  1688. The font files used by the grabbers when running in a window are provided in
  1689. this kit. You will find them on the Virtual Device Samples and Tools disk #
  1690. 2 (3) under the \OEMFONTS directory structure.  %@NL@%
  1691.  
  1692. Before building the OEM fonts, you need to create the FONTS.OBJ file by
  1693. running the following from the \OEMFONTS directory:  %@NL@%
  1694.  
  1695. %@STUB@%    MASM FONTS;%@NL@%
  1696.  
  1697. Once this is completed, you run the MAKE file from the \FONTS directory:  %@NL@%
  1698.  
  1699. %@STUB@%    MAKE FONTS%@NL@%
  1700.  
  1701. To build these files properly, you need to make sure you have WINSTUB.EXE,
  1702. which is provided in the SDK, in your MS-DOS path %@AI@%before%@AE@% building the
  1703. grabbers and/or OEM font files.  %@NL@%
  1704.  
  1705.  
  1706. %@2@%%@CR:C6A00070004 @%%@AB@%7.3  The DMA Device (VDMAD)%@AE@%%@EH@%%@NL@%
  1707.  
  1708. This device handles direct memory access (DMA) devices. Virtual devices can
  1709. support hardware cards that use DMA by calling the DMA services provided by
  1710. the VDMAD. These services are documented in Chapter 41, "Virtual DMA Device
  1711. (VDMAD) Services," of the %@AI@%Microsoft Windows Virtual Device Adaptation Guide%@AE@%.
  1712. %@NL@%
  1713.  
  1714. See Section 7.15, "The Floppy Drive Device (VFD)," for an example of a
  1715. device that uses the DMA services. Be sure to expand the compressed files to
  1716. their normal size after copying them to your hard disk. See Section 5.2,
  1717. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1718. this.  %@NL@%
  1719.  
  1720. The VDMAD should not normally need to be customized; it should only need to
  1721. be altered to support DMA on machines with non-standard architectures.  %@NL@%
  1722.  
  1723. The sources are on the Virtual Device Samples and Tools disk # 1 (2) under
  1724. the \VDMAD directory structure.  %@NL@%
  1725.  
  1726.  
  1727. %@2@%%@CR:C6A00070005 @%%@AB@%7.4  The EBIOS Device (EBIOS)%@AE@%%@EH@%%@NL@%
  1728.  
  1729. This device detects the extended BIOS data region on machines that use it
  1730. such as the PS/2, identifies it, and ensures that it is reserved as global
  1731. memory.  %@NL@%
  1732.  
  1733. It will probably not need to be modified. However, it is provided here as an
  1734. example of a relatively simple device that passively accommodates something
  1735. in the environment.  %@NL@%
  1736.  
  1737. The sources are on the Virtual Device Samples and Tools disk # 1 (1) under
  1738. the \EBIOS directory structure. Be sure to expand the compressed files to
  1739. their normal size after copying them to your hard disk. See Section 5.2,
  1740. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1741. this.  %@NL@%
  1742.  
  1743.  
  1744. %@2@%%@CR:C6A00070006 @%%@AB@%7.5  The Hard Disk Device (VHD)%@AE@%%@EH@%%@NL@%
  1745.  
  1746. This device virtualizes access to the hard disk. It also provides direct
  1747. access to the disk for demand paging on compatible hardware.  %@NL@%
  1748.  
  1749. This should be modified to support incompatible hard disks.  %@NL@%
  1750.  
  1751. The sources are on the Virtual Device Samples and Tools disk # 1 (2) under
  1752. the \VHD directory structure. Be sure to expand the compressed files to
  1753. their normal size after copying them to your hard disk. See Section 5.2,
  1754. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1755. this.  %@NL@%
  1756.  
  1757.  
  1758. %@2@%%@CR:C6A00070007 @%%@AB@%7.6  The Keyboard Device (VKD)%@AE@%%@EH@%%@NL@%
  1759.  
  1760. This is one of the more complicated virtual devices, as it not only
  1761. virtualizes the keyboard but also interacts with the Windows shell to handle
  1762. hotkeys and other special functions. It should be modified to support other,
  1763. nonstandard keyboards.  %@NL@%
  1764.  
  1765. The sources are on the Virtual Device Samples and Tools disk # 1 (2) under
  1766. the \VKD directory structure. Be sure to expand the compressed files to
  1767. their normal size after copying them to your hard disk. See Section 5.2,
  1768. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1769. this.  %@NL@%
  1770.  
  1771.  
  1772. %@2@%%@CR:C6A00070008 @%%@AB@%7.7  The Mouse Device (VMD)%@AE@%%@EH@%%@NL@%
  1773.  
  1774. This device virtualizes the mouse and maps the INT 33H API between protected
  1775. mode and virtual 8086 mode.  %@NL@%
  1776.  
  1777. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  1778. the \VMD directory structure. Be sure to expand the compressed files to
  1779. their normal size after copying them to your hard disk. See Section 5.2,
  1780. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1781. this.  %@NL@%
  1782.  
  1783.  
  1784. %@2@%%@CR:C6A00070009 @%%@AB@%7.8  The NetBIOS Device (VNETBIOS)%@AE@%%@EH@%%@NL@%
  1785.  
  1786. This device maps the NetBIOS API between protected mode and virtual 8086
  1787. mode, enabling Windows applications to access the network using NetBIOS
  1788. calls. It also handles asynchronous network transactions by mapping the
  1789. application's buffer into global memory, so the network software can access
  1790. it when the asynchronous event occurs, even if another virtual machine is
  1791. running at that time.  %@NL@%
  1792.  
  1793. This should be modified by network vendors who extend the standard NetBIOS
  1794. interface and should also serve as a guide to writing virtual devices for
  1795. other types of network API.  %@NL@%
  1796.  
  1797. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  1798. the \VNETBIOS directory structure. Be sure to expand the compressed files to
  1799. their normal size after copying them to your hard disk. See Section 5.2,
  1800. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1801. this.  %@NL@%
  1802.  
  1803.  
  1804. %@2@%%@CR:C6A00070010 @%%@AB@%7.9  The Local DOS Network Device (LDOSNET)%@AE@%%@EH@%%@NL@%
  1805.  
  1806. This device is not part of the Windows 3.0 retail package. However, it is
  1807. included in the DDK as a sample source to demonstrate some mechanisms used
  1808. in supporting network functionality.  %@NL@%
  1809.  
  1810. In general, this device manages network connections and ensures network
  1811. integrity across all virtual machines.  %@NL@%
  1812.  
  1813. This source was included in previous DDK releases under the name DOSNET.
  1814. However, it has been replaced in the Windows 3.0 retail package by a new
  1815. DOSNET device that makes network connections global across all virtual
  1816. machines. The version included here keeps connections local, but allows
  1817. inheritance. It has, therefore, been renamed LDOSNET to avoid confusion.  %@NL@%
  1818.  
  1819. The device could serve as a model for handling some types of networks. In
  1820. general, however, we recommend that network connections be global instead of
  1821. local.  %@NL@%
  1822.  
  1823. On MS-Net networks, the enhanced Windows LDOSNET device provides the
  1824. following support:  %@NL@%
  1825.  
  1826.  
  1827.   ■   If a connection exists before Windows is started, it is global and
  1828.       cannot be deleted from within Windows or any VMs.%@NL@%
  1829.  
  1830.   ■   If the user makes a connection in Windows and, then, spawns off
  1831.       another virtual machine, that VM inherits Windows' connections as of
  1832.       that time.%@NL@%
  1833.  
  1834.   ■   If a VM has inherited a connection from Windows, it cannot delete it.%@NL@%
  1835.  
  1836.   ■   If any VM exists that inherited a particular connection from Windows,
  1837.       Windows cannot delete that connection.%@NL@%
  1838.  
  1839.  
  1840. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  1841. the \LDOSNET directory structure. Be sure to expand the compressed files to
  1842. their normal size after copying them to your hard disk. See Section 5.2,
  1843. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1844. this.  %@NL@%
  1845.  
  1846.  
  1847. %@2@%%@CR:C6A00070011 @%%@AB@%7.10  The BIOS Device (BIOSXLAT)%@AE@%%@EH@%%@NL@%
  1848.  
  1849. This device maps the ROM BIOS API between protected mode and virtual 8086
  1850. mode, thereby providing Windows applications and device drivers with access
  1851. to ROM BIOS services.  %@NL@%
  1852.  
  1853. This should be modified when there are non-standard ROM BIOS calls that pass
  1854. pointers to memory and that are used by Windows applications or device
  1855. drivers.  %@NL@%
  1856.  
  1857. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  1858. the \BIOSXLAT directory structure. Be sure to expand the compressed files to
  1859. their normal size after copying them to your hard disk. See Section 5.2,
  1860. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1861. this.  %@NL@%
  1862.  
  1863.  
  1864. %@2@%%@CR:C6A00070012 @%%@AB@%7.11  The Paging Device (PAGESWAP)%@AE@%%@EH@%%@NL@%
  1865.  
  1866. This device is used by 386 enhanced mode for demand paging at either the INT
  1867. 21H or INT 13H level.  %@NL@%
  1868.  
  1869. The sources are on the Virtual Device Samples and Tools disk # 1 (1) under
  1870. the \PAGESWAP directory structure. Be sure to expand the compressed files to
  1871. their normal size after copying them to your hard disk. See Section 5.2,
  1872. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1873. this.  %@NL@%
  1874.  
  1875.  
  1876. %@2@%%@CR:C6A00070013 @%%@AB@%7.12  The Printer Device (VPD)%@AE@%%@EH@%%@NL@%
  1877.  
  1878. The printer device virtualizes access to the parallel ports. If a second
  1879. virtual machine tries to access one of the ports while it is being used by
  1880. another application, a contention dialog is presented to the user that
  1881. allows them to resolve the ownership dispute.  %@NL@%
  1882.  
  1883. The sources are on the Virtual Device Samples and Tools disk # 2 (3) under
  1884. the \VPD directory structure. Be sure to expand the compressed files to
  1885. their normal size after copying them to your hard disk. See Section 5.2,
  1886. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1887. this.  %@NL@%
  1888.  
  1889.  
  1890. %@2@%%@CR:C6A00070014 @%%@AB@%7.13  The COMM Device (VCD)%@AE@%%@EH@%%@NL@%
  1891.  
  1892. This device virtualizes the standard serial ports on ISA type machines. It
  1893. supports COM1 through COM4.  %@NL@%
  1894.  
  1895. It should be modified to add support for different chip sets or for
  1896. additional COM ports.  %@NL@%
  1897.  
  1898. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  1899. the \VCD directory structure. Be sure to expand the compressed files to
  1900. their normal size after copying them to your hard disk. See Section 5.2,
  1901. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1902. this.  %@NL@%
  1903.  
  1904.  
  1905. %@2@%%@CR:C6A00070015 @%%@AB@%7.14  The COM Buffer Device (COMBUFF)%@AE@%%@EH@%%@NL@%
  1906.  
  1907. This device is responsible for buffering COM I/O. It is closely tied to the
  1908. Virtual COMM Device (VCD).  %@NL@%
  1909.  
  1910. It can be modified to support alternative serial communications ports or to
  1911. use specific XON/XOFF protocols instead of relying on the applications to do
  1912. so.  %@NL@%
  1913.  
  1914. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  1915. the \COMBUFF directory structure. Be sure to expand the compressed files to
  1916. their normal size after copying them to your hard disk. See Section 5.2,
  1917. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1918. this.  %@NL@%
  1919.  
  1920.  
  1921. %@2@%%@CR:C6A00070016 @%%@AB@%7.15  The Floppy Drive Device (VFD)%@AE@%%@EH@%%@NL@%
  1922.  
  1923. This device is responsible for the removal of special timer port trappings
  1924. to ensure that copy-protection schemes work properly, and for communications
  1925. with the VDMAD to synchronize DMA channel usage.  %@NL@%
  1926.  
  1927. The sources are on the Virtual Device Samples and Tools disk # 2 (2) under
  1928. the \VFD directory structure. Be sure to expand the compressed files to
  1929. their normal size after copying them to your hard disk. See Section 5.2,
  1930. "Expand the Compressed Files to Their Normal Size," for details on how to do
  1931. this.  %@NL@%
  1932.  
  1933.  
  1934.  
  1935.