Device Drivers

Windows 95 provides improved support for hardware devices and peripherals including disk devices, display adapters, mice and other pointing devices, modems, fax machines, and printers.

In Windows 3.1, device drivers were, for the most part, monolithic and complex to develop. Windows 95 uses a universal driver/mini-driver architecture that makes it easier for hardware vendors to provide device-specific code for their hardware.

A universal driver includes most of the code necessary for devices in a particular class of devices (such as printers or modems) to communicate with the appropriate operating system components (such as the printing or communications subsystems). A mini-driver is the relatively small and simple driver that contains any additional instructions needed by a specific device. In many cases, however, the universal driver for a particular category of devices also includes the code needed to operate devices designed to the most common standard for that category. (For example, the Unimodem driver works with all modems supporting AT commands.)

A virtual device driver (VxD) is a 32-bit, protected-mode driver that manages a system resource, such as a hardware device or installed software, so that more than one application can use the resource at the same time. VxD refers to a general virtual device driver—the x represents the type of device driver. For example, a virtual device driver for a display device is known as a VDD, a virtual device driver for a timer device is a VTD, a virtual device driver for a printer device is a VPD, and so forth.

With Windows 3.1, VxDs were statically loaded and took up a lot of memory space. However, Windows 95 dynamically loads VxDs — only those that are needed at any given time are loaded into memory. In addition, the new VxDs don't require all of their memory to be page-locked, thereby further increasing the available memory in the system.

VxDs support all hardware devices for a typical computer, including disk controllers, serial and parallel ports, keyboard and display devices, and so on. If the state of the hardware device can be disrupted by switching between multiple applications, the device must have a corresponding virtual device and VxD. The virtual device keeps track of the state of the device for each application and ensures that the device is in the correct state whenever an application continues.

Although most virtual devices manage hardware, some manage only installed software, such as an MS-DOS device driver or a TSR program. Such virtual devices contain code to emulate the software or ensure that the software uses data that applies only to the currently running application. Also, VxDs are often used to improve software performance.

(Windows 95 virtual device driver files have a filename extension of .VXD; Windows 3.1 drivers used an extension of .386.)