Partager via


POWER_BROADCAST

This structure is used to issue power notification events through message queues.

typedef struct _POWER_BROADCAST {
  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_TRANSITION System power state transition.
    PBT_RESUME Resume from previous state.
    PBT_POWERSTATUSCHANGE Power supply switched to/from AC/DC.
    PBT_POWERINFOCHANGE A member of the POWER_BROADCAST_POWER_INFO structure has changed.
  • Flags
    Use one of the system power flags shown in the following table.
    System power flag Description
    POWER_STATE_ON On state.
    POWER_STATE_OFF No power, full off.
    POWER_STATE_CRITICAL Critical off.
    POWER_STATE_BOOT Boot state.
    POWER_STATE_IDLE Idle state.
    POWER_STATE_SUSPEND Suspend state.
    POWER_STATE_RESET Reset state.
  • Length
    The byte count of SystemPowerState.
  • SystemPowerState
    The named system power state Flags.

Remarks

Applications and drivers register for power events with RequestPowerNotifications and deregister with StopPowerNotifications. Power notification events are issued in a POWER_BROADCAST structure, through message queues.

These notifications are multicast messages that are sent only to applications and drivers that have registered to receive the messages.

The POWER_BROADCAST structure has a variable length. The SystemPowerState array is a placeholder for data associated with the message being broadcast and is not always WCHAR data. For example, the PBT_POWERINFOCHANGE message embeds a POWER_BROADCAST_POWER_INFO structure.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pm.h.

See Also

POWER_BROADCAST | RequestPowerNotifications | StopPowerNotifications

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.