Windows Device Drivers

A device driver is a software translator that accepts commands from the operating system and translates them into commands for a specific piece of hardware. Device drivers often are developed by hardware manufacturers, and are not supported directly by Microsoft.

click to view at full size.

Figure 1.9 Device driver architecture

Device drivers allow developers to create applications that are independent of hardware. In other words, developers do not need to know what hardware a user has in order to create an application. A user , in turn , can add or change hardware in a computer without affecting the program.

Windows uses drivers for components such as:

  • Displays
  • Sound
  • Communications
  • Printers
  • Network adapters

Depending upon which Windows operating system the driver was designed for, Windows device drivers are classified in two ways: protected-mode and real-mode.

Protected-Mode vs. Real-Mode Drivers

Real-mode drivers are drivers that were created to run under the real mode MS-DOS operating system. Real-mode drivers are not as secure or robust as protected-mode drivers are.

Protected-mode drivers take advantage of the architecture of the 80386 and higher processors' protected mode. A protected-mode driver, also known as a virtual device driver (VxD), allows for faster, shared access to a device. In addition, the Windows operating system can run the 32-bit protected-mode code of a virtual device more efficiently than the 16-bit real-mode code of an MS-DOS device driver.

Although Windows 95 supports real-mode and protected-mode drivers, Windows NT will not support real-mode drivers. Microsoft strongly recommends that you use 32-bit, protected-mode drivers wherever possible.



Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net