How to Implement Plug and Play and Power Management in WDF Drivers


The rest of this chapter provides sample code that shows how to implement Plug and Play and power management in several types of drivers:

  • Software-only drivers.

  • Simple function drivers, such as UMDF protocol function drivers and KMDF hardware function drivers that do not support idle or wake.

  • KMDF hardware function drivers that support idle and wake.

The Plug and Play and power management implementation is more complex in each successive example, and each example builds upon the information in the previous examples. You can add the Plug and Play and power code to your own driver in a similar incremental way. Even if your device supports advanced capabilities such as idle or wake, you can start by implementing the simple features. When these features work correctly, you can implement additional callbacks to support the more complex features.

For each type of driver, the discussion covers:

  • The type of driver and the Plug and Play and power management features that the driver implements.

  • The framework methods that the driver calls and the event callbacks that the driver implements to support the Plug and Play and power management features.

  • Sample code that shows the implementation of those features.

  • The actions that the framework takes in response to various example Plug and Play and power events for this driver type.

In each sample listing, the significant lines of code are in bold.




Developing Drivers with the Microsoft Windows Driver Foundation
Developing Drivers with the Windows Driver Foundation (Pro Developer)
ISBN: 0735623740
EAN: 2147483647
Year: 2007
Pages: 224

Similar book on Amazon
Windows Internals, Part 1: Covering Windows Server 2008 R2 and Windows 7
Windows Internals, Part 1: Covering Windows Server 2008 R2 and Windows 7
Windowsu00ae Internals: Including Windows Server 2008 and Windows Vista, Fifth Edition (Pro Developer)
Windowsu00ae Internals: Including Windows Server 2008 and Windows Vista, Fifth Edition (Pro Developer)
Advanced Windows Debugging
Advanced Windows Debugging
The Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition)
The Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition)

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