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. |
This structure is used to issue power notification events through message queues.
Syntax
struct { DWORD Message; DWORD Flags; DWORD Length; WCHAR SystemPowerState[1]; } POWER_BROADCAST, *PPOWER_BROADCAST; |
Members
- Message
-
This field defines the event type. Set to one of the events shown in the following table.
Event type Description PBT_POWERSTATUSCHANGE
Power supply switched to/from AC/DC.
PBT_RESUME
Resume from previous state.
PBT_TRANSITION
System power state transition.
- Flags
-
Use one of the system power flags shown in the following table.
System power flag Description POWER_STATE_BOOT
Boot state.
POWER_STATE_CRITICAL
Critical off.
POWER_STATE_IDLE
Idle state.
POWER_STATE_ON
On state.
POWER_STATE_OFF
No power, full off.
POWER_STATE_RESET
Reset state.
POWER_STATE_SUSPEND
Suspended state.
- Length
-
The byte count of SystemPowerState.
- SystemPowerState
-
The named system power state Flags.
Remarks
Applications and drivers register for power events with RequestPowerNotificationsand unregister with StopPowerNotifications. Power notification events are issued in a POWER_BROADCASTstructure, through message queues.
These notifications are multicast messages that are sent only to applications and drivers that have registered to receive the messages.