Partager via


Best Practices for Power Manageable Device Drivers (Windows Embedded CE 6.0)

1/6/2010

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 Embedded 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.

See Also

Reference

CEDDK Dynamic-Link Library Bus Access Reference

Concepts

Bus Drivers
Windows Embedded CE Drivers

Other Resources

Best Practices for Developing a Device Driver
Power Management I/O Controls
Power Management