Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Power Manager provides a set of functions that allow applications to receive notifications of power-related events and to participate in system power status change decisions. These functions are shown in the following table.
Function | Description |
---|---|
Requests that Power Manager send notification of power events. |
|
Cancels a notification request made with RequestPowerNotifications. |
Notifications are delivered through message queues. To use notifications, applications must create a message queue and pass its handle to Power Manager with the RequestPowerNotificationsfunction. Applications generally create a thread that waits for the message queue.
Power Manager defines the notifications shown in the following table.
Notification | Description |
---|---|
PBT_RESUME |
Generated when the system resumes from a suspended state. |
PBT_POWERSTATUSCHANGE |
Generated when the system transitions to or from AC power. |
PBT_TRANSITION |
Generated when Power Manager is performing a system power state change. |
PBT_POWERINFOCHANGE |
Generated when battery information or AC line status changes. |