Application Power Management

The Power Manager is responsible for managing device power as defined in system power state registry entries.

The following table shows the power management APIs.

Function Description
GetDevicePower Returns a device power state.
GetSystemPowerState Returns the current system power state in effect.
GetSystemPowerStatusEx2 Retrieves battery status information.
ReleasePowerRequirement Informs the Power Manager to release a power requirement set by SetPowerRequirement.
RequestPowerNotifications Allows applications and drivers to register for power notification events.
SetDevicePower Sets device power state on a device.
SetPowerRequirement Notifies the Power Manager that an application has a specific device power requirement. This function prevents the system from placing the named device into the default system state while the requirement is outstanding.
SetSystemPowerState Sets the system power state to the requested value. Depending on the StateFlags parameter, the function either sets the state immediately or requests permission from all applications and device drivers before doing so.
StopPowerNotifications Allows applications and drivers to stop receiving power notification events.

Microsoft discourages application developers from calling SetDevicePower in their applications because it overrides the Power Manager algorithms for managing device power. Application developers should also not call SetSystemPowerState in their applications except to suspend the system, if the Power Manager is actively managing system power state transitions.

See Also

Power Management | How to Add Power Management to a Device Driver

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.