Best Practices for Power Manageable Device Drivers (Windows CE 5.0)
Microsoft recommends that a device driver expose all possible power management capabilities, and that it function properly regardless of whether a run-time image takes advantage of the power management capabilities of the Windows CE OS. These power-management best practices might affect the external interface of a device driver.
The following list shows best practices for power management:
- Expose the power management stream IOCTLs in client drivers.
- Do not expose the deprecated IOCTL_POWER_QUERY.
- Handle the XXX_PowerDown (Device Manager) and XXX_PowerUp (Device Manager) stream interface driver entry points correctly.
- Call the bus parent of a device driver for power management.
For example, after obtaining a handle to the bus with CreateBusAccessHandle, you can use functions such as GetDevicePowerState and SetDevicePowerState to request that the bus driver retrieve or set the device's power state.
- Perform power management in a device driver when the run-time image does not take advantage of the power management that the OS provides.
- Handle interleaved power management stream IOCTLs and interleaved I/O operations.
Send Feedback on this topic to the authors