Share via


Notify Power Manager (Compact 2013)

3/26/2014

To notify Power Manager of your device driver power management capabilities, you expose a power management device interface that allows Power Manager to query your device power management capabilities and to control its power state. For more information about device interfaces, see Support Device Interfaces.

The power management interface you implement depends on the kind of device that your driver supports. The following table lists predefined power management interfaces and the kind of device each supports for managing power on that type of device.

Interface

Device type

PMCLASS_BLOCK_DEVICE

Storage device

PMCLASS_DISPLAY

Display device

PMCLASS_NDIS_MINIPORT

Network device

PMCLASS_GENERIC_DEVICE

All other devices

These interfaces are defined in the header file %_WINCEROOT%\public\COMMON\sdk\inc\pm.h.

After you implement the required interface for your device type, call the AdvertiseInterface function to advertise your interface. Power Manager uses IOControl commands to query your device power management capabilities after you advertise your interface. In addition, to register your device driver for power management notifications, call the RequestPowerNotifications function and pass a handle to a message queue that is exclusively created for power management notifications. Do this only if your driver must respond to a power notification and can afford to incur the associated overhead. Typically, after your device driver advertises power management capabilities to Power Manager, your driver needs to process only DeviceIoControl calls from Power Manager.

See Also

Concepts

Support Power Management