SYSTEM_POWER_STATUS_EX (Compact 2013)
3/28/2014
This structure contains information about the power status of the system.
Syntax
typedef struct _SYSTEM_POWER_STATUS_EX {
BYTE ACLineStatus;
BYTE BatteryFlag;
BYTE BatteryLifePercent;
BYTE Reserved1;
DWORD BatteryLifeTime;
DWORD BatteryFullLifeTime;
BYTE Reserved2;
BYTE BackupBatteryFlag;
BYTE BackupBatteryLifePercent;
BYTE Reserved3;
DWORD BackupBatteryLifeTime;
DWORD BackupBatteryFullLifeTime;
} SYSTEM_POWER_STATUS_EX, *PSYSTEM_POWER_STATUS_EX,
*LPSYSTEM_POWER_STATUS_EX;
Members
ACLineStatus
AC power status. It is one of the following values.Value
Description
AC_LINE_OFFLINE
Offline
AC_LINE_ONLINE
Online
AC_LINE_BACKUP_POWER
Backup Power
AC_LINE_UNKNOWN
Unknown status
All other values are reserved.
BatteryFlag
Battery charge status. It can be a combination of the following values:Value
Description
BATTERY_FLAG_HIGH
High
BATTERY_FLAG_LOW
Low
BATTERY_FLAG_CRITICAL
Critical
BATTERY_FLAG_CHARGING
Charging
BATTERY_FLAG_NO_BATTERY
No system battery
BATTERY_FLAG_UNKNOWN
Unknown status
- BatteryLifePercent
Percentage of full battery charge remaining. This member can be a value in the range 0 to 100, or BATTERY_FLAG_UNKNOWN if status is unknown. All other values are reserved.
- Reserved1
Reserved; set to 0 (zero).
- BatteryLifeTime
Number of seconds of battery life remaining, or BATTERY_FLAG_UNKNOWN if remaining seconds are unknown.
- BatteryFullLifeTime
Number of seconds of battery life when at full charge, or BATTERY_FLAG_UNKNOWN if full lifetime is unknown.
- Reserved2
Reserved; set to 0 (zero).
BackupBatteryFlag
Backup battery charge status. It can be a combination of the following values:- BATTERY_FLAG_HIGH
- BATTERY_FLAG_CRITICAL
- BATTERY_FLAG_CHARGING
- BATTERY_FLAG_NO_BATTERY
- BATTERY_FLAG_UNKNOWN
- BATTERY_FLAG_LOW
- BackupBatteryLifePercent
Percentage of full backup battery charge remaining. Must be in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN.
- Reserved3
Reserved; set to 0 (zero).
- BackupBatteryLifeTime
Number of seconds of backup battery life remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown.
- BackupBatteryFullLifeTime
Number of seconds of backup battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime is unknown.
Remarks
Returning BATTERY_FLAG_NO_BATTERY can cause a low power battery alert to appear. If no backup battery is present, the low power alert can be avoided by returning BATTERY_FLAG_UNKNOWN.
Requirements
Header |
winbase.h |
See Also
Reference
System Information Structures
GetSystemPowerStatusEx