Chapter 9. Hardware Initialization

< BACK  NEXT >
[oR]

Chapter 9. Hardware Initialization

CHAPTER OBJECTIVES

  • The Plug & Play Architecture: A Brief History

  • The Role of the Registry for Legacy Drivers

  • Detecting Devices with Plug and Play

  • The Role of Driver Layers in Plug and Play

  • The New WDM IRP Dispatch Functions

  • Device Enumeration

  • Device Interfaces

  • Code Example: A Simple Plug and Play Driver

  • Summary

At the end of the last chapter, the sample parallel loopback driver was unrealistic in one critical area: the configuration of the parallel hardware was presumed. Hard-coded driver logic assumed that port hardware could be found at a fixed I/O address with a fixed IRQ level. Clearly, real driver code cannot be presumptuous. This chapter covers the subject of driver and device initialization.

First, in sections 9.1 and 9.2 the challenges of initialization are discussed from a historical perspective. The role of the Windows 2000 Registry in tracking installed devices is covered.

Next, the current Plug and Play architecture of Windows 2000 is discussed, including the use of layered drivers used in this implementation. The specifics of new IRP Dispatch functions are shown.

Finally, the driver presented in the last chapter is "corrected" to use the Plug and Play architecture. The parallel port hardware is automatically detected and its real configuration is used.

< BACK  NEXT >


The Windows 2000 Device Driver Book(c) A Guide for Programmers
The Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition)
ISBN: 0130204315
EAN: 2147483647
Year: 2000
Pages: 156

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