Prior to the advent of Windows, DOS applications frequently communicated directly with various pieces of hardware, by responding to interrupts, reading and writing device memory etc. Each application expected to have exclusive and complete control over the hardware. Though Windows applications don't often communicate directly with hardware, it was the only way to write Windows drivers, and still is in the real and standard modes of Windows 3.x. Despite the fact that Windows switched from running in real mode to protected mode, direct hardware access and interrupt hooking could still be done because when Windows switched to running in protected mode it kept the single privilege level model used in real mode. This lasted all the way through Windows 9x. Windows/386 and onwards allowed multiple MS-DOS applications to execute simultaneously. This was done by executing each legacy application within its own virtual machine. To share arbitrary physical resources amongst these virtual machines, Microsoft introduced dynamically-loadable virtual device drivers. These drivers solved issues relating to conflicting usage of physical resources by intercepting calls to the hardware. Instead of a Machine Port representing an actual device, it would represent a "virtual" device, which could be managed by the operating system.
VxDs are not usable in Windows NT or its descendants. These operating systems use the Windows Driver Model (WDM). Windows Vista supports both WDM and the newer Windows Driver Foundation which includes Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF). KMDF is also available for download for Windows XP and Windows 2000, while UMDF is available only for Windows XP.
|