1.2 Common Virtual Devices

Windows includes a wide variety of virtual devices to support common hardware devices and installable software. In some cases, a virtual device may need to be modified to accommodate new features or to support nonstandard hardware. The following list introduces the virtual devices that are most commonly modified:

Device Description

biosxlat The virtual BIOS device maps the ROM BIOS APIs for protected-modes applications, allowing Windows applications and device drivers access to ROM BIOS services. You must modify this virtual device if you want Windows applications or device drivers to use nonstandard ROM BIOS APIs.
combuff The virtual communications buffer device works in conjunction with the virtual communications device (VCD) to buffer serial port input. You can modify this virtual device to provide other handshaking protocols.
ebios The virtual EBIOS device reserves the memory occupied by the EBIOS on the given computer. Although rarely needing modification, this virtual device is a good example of a simple device which manages installed software, rather than a specific hardware device.
int13 The virtual Interrupt 13h device traps and emulates Interrupt 13h BIOS functions. It is used in conjunction with the virtual block device.
ldosnet The virtual network device manages network connections and assures network integrity across all running applications. This virtual device demonstrates the recommended ways to support the network. You must modify this virtual device if your software does not use standard MS-DOS redirector calls for handling network connections.
pagefile The virtual swap file device manages the virtual memory paging file and carries out all read and write operations requested by the virtual paging device (PAGESWAP). This virtual device can use 32-bit disk access, such as provided by the Western Digital 1003 (WDCTRL) device, or use either MS-DOS system functions (Interrupt 21h) or ROM BIOS routines (Interrupt 13h) to carry out the read and write operations.
pageswap The virtual paging device provides demand-paging support for Windows. The virtual device reads and writes pages using the virtual swap file device.
vcd The virtual communications device virtualizes the standard serial ports on Industry Standard Architecture (ISA) computers, supporting ports COM1 through COM4. You must modify this virtual device for computers that use nonstandard chip sets, or have additional COM ports.
vdd The virtual display device virtualizes the display adapter, including video memory, registers, and ROM BIOS interrupts. This virtual device also provides APIs to permit an accompanying 386 enhanced-mode grabber to draw screen output for a non-Windows applications when run in a window, as well as to retrieve screen contents for cut and paste operations. Windows includes virtual display devices for CGA, EGA, VGA, 8514/a, Hercules, and Video 7 VGA. You must modify the virtual display device only if your display adapter is not compatible with one of these display types. For more information about the 386 enhanced-mode grabbers, see the Microsoft Windows Device Driver Adaptation Guide.
vdmad The virtual direct memory access (DMA) device virtualizes DMA devices. This virtual device provides services that other virtual devices, such as the virtual floppy disk device, use to carry data transfers using DMA channels. If your virtual device supports hardware that requires DMA transfers, it should use the virtual DMA device services to carry out these transfers. You should modify this virtual device only for computers having nonstandard architectures.
vfd The virtual floppy drive device removes special timer port trappings to ensure that copy protection schemes work properly, and communicates with the virtual DMA device to synchronize DMA channel usage.
vkd The virtual keyboard device virtualizes keyboard input, supports Windows shell hotkeys, provides for pasting text into a virtual machine, and manages keyboard input when in message mode. You must modify the virtual keyboard device if your keyboard hardware is not compatible with standard keyboards.
vmd The virtual mouse device virtualizes mouse input and maps the Interrupt 33h API for use by protected-mode applications.
vnetbios The virtual NetBIOS device maps the NetBIOS API for protected-mode applications, allowing Windows applications to access the network. It also handles asynchronous network transactions by mapping the application's buffer into global memory, so the network software can access the buffer even if another application is running at the time. You must modify this virtual device if you extend the standard NetBIOS interface.
vpd The virtual printer device virtualizes the parallel ports. If a second virtual machine tries to access one of the ports while it is being used by another application, a contention dialog box is displayed to the user, allowing the user to resolve the conflict. Although this virtual device is not used with Windows 3.1, it is a good example of a simple virtual device.
wdctrl The 386 enhanced-mode block device provides direct access to hard-drive controllers that are compatible with Western Digital 1003 devices. This direct access allows virtual devices to carry out input and output operations on disk entirely in ring 0 protected mode, bypassing the real mode BIOS and improving performance.

Windows provides many other virtual devices that are not intended to be modified, but help support other virtual devices. For example, many virtual devices use the services provided by the V86 memory manager (V86MMGR) and the virtual programmable interrupt controller device (VPICD) to reserve V86 mode memory and enable interrupt requests (IRQs) for their hardware.

To help with you develop virtual devices, the Microsoft Windows Device Development Kit includes source code for fully operational virtual devices. For more information about the sample sources, see the Microsoft Windows Installation and Update Guide.