Partager via


POWER_BROADCAST_POWER_INFO

This structure is used instead of a string name in the POWER_BROADCAST structure. This is only the case if the broadcast is of type PBT_POWERINFOCHANGE.

typedef struct _POWER_BROADCAST_POWER_INFO {
  DWORD dwBatteryLifeTime;
  DWORD dwBatteryFullLifeTime;
  DWORD dwBackupBatteryLifeTime;
  DWORD dwBackupBatteryFullLifeTime;
  BYTE bACLineStatus;
  BYTE bBatteryFlag;
  BYTE bBatteryLifePercent;
  BYTE bBackupBatteryFlag;
  BYTE bBackupBatteryLifePercent;
} POWER_BROADCAST_POWER_INFO, *PPOWER_BROADCAST_POWER_INFO;

Members

  • dwBatteryLifeTime
    Number of seconds of battery life remaining, or 0xFFFFFFFF if remaining seconds are unknown.
  • dwBatteryFullLifeTime
    Number of seconds of battery life when at full charge, or 0xFFFFFFFF if full battery lifetime is unknown.
  • dwBackupBatteryLifeTime
    Number of seconds of backup battery life remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown.
  • dwBackupBatteryFullLifeTime
    Number of seconds of backup battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full battery lifetime is unknown.
  • bACLineStatus
    AC power status. This member can be one of the values in the following table.
    Value Description
    0 Offline
    1 Online
    255 Unknown status
  • All other values are reserved.
    bBatteryFlag
    Battery charge status. This member can be a combination of the values in the following table.
    Value Description
    1 High
    2 Low
    4 Critical
    8 Charging
    128 No system battery
    255 Unknown status
  • All other values are reserved.
    bBatteryLifePercent
    Percentage of full battery charge remaining. This member can be a value in the range 0 (zero) to 100, or 255 if the status is unknown. All other values are reserved.
  • bBackupBatteryFlag
    Backup battery charge status. This member can be one of the following values:
    • BATTERY_FLAG_HIGH
    • BATTERY_FLAG_CRITICAL
    • BATTERY_FLAG_CHARGING
    • BATTERY_FLAG_NO_BATTERY
    • BATTERY_FLAG_UNKNOWN
    • BATTERY_FLAG_LOW
  • bBackupBatteryLifePercent
    Percentage of full backup battery charge remaining. This value must be in the range of 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN.

Requirements

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

See Also

POWER_BROADCAST

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.