Summary

VDDs provide a translation layer between 16-bit MS-DOS applications and special-purpose hardware devices in the Windows NT system. A VDD turns an application’s attempt to write directly to a device into a Win32 API call that makes a request to a Windows NT kernel-mode device driver. The key characteristic of every VDD is the original MS-DOS application does not need to be modified to work on Windows NT machines. By adding a VDD and a kernel-mode device driver, an application developer can move an existing MS-DOS application and its dedicated hardware device to Windows NT.

For improved performance, the MS-DOS application can be modified to directly call its companion VDD. Otherwise, the unmodified application can rely on the VDM to intercept disallowed device accesses and route them to the VDD.

The three main areas in which the VDM intercepts an application’s attempts to interact directly with device hardware are:

  1. I/O ports

  2. Memory mapped I/O

  3. DMA

The VDD can install callback functions to handle I/O port access and memory-mapped I/O. The VDD can also make calls to functions provided by Windows NT to support DMA transfers between an application and a hardware device. In addition, Windows NT supplies functions that allow a VDD to query and set processor registers and simulate interrupts. These services allow the VDD to fully support the functionality of the original MS-DOS application and its accompanying hardware device.

 For information about writing 32-bit device drivers, see the Kernel-mode Driver Design Guide.