IMPLEMENTING POWER MANAGEMENT
This section implements a rudimentary Power Management (PM) system for a device driver. The system is implemented as the four Power Management IOCTLs and registers the device for system requests to change its power state, and responds to queries about its power state. This PM system does not implement a message queue to handle power requests and does not attempt to send any requests to change its power state because of any inactivity, and so on by itself. The code in this section is in the code snippets file. The driver subproject is also included in the folder MorePower.
1. Create a new stream driver with the CEDriverWiz Wizard with the following configuration:
The last option adds the four power IOCTLs:
These IOCTLs as added by the wizard need implementation and return false to indicate to the operating system that PM has not been implemented.
2. Add the following declarations, the #include entries ...