[StructLayout(LayoutKind.Sequential)]
internal class SYSTEM_POWER_STATUS_EX
{
public BYTE ACLineStatus = 0;
public BYTE BatteryFlag = 0;
public BYTE BatteryLifePercent = 0;
public BYTE Reserved1 = 0;
public DWORD BatteryLifeTime = 0;
public DWORD BatteryFullLifeTime = 0;
public BYTE Reserved2 = 0;
public BYTE BackupBatteryFlag = 0;
public BYTE BackupBatteryLifePercent = 0;
public BYTE Reserved3 = 0;
public DWORD BackupBatteryLifeTime = 0;
public DWORD BackupBatteryFullLifeTime = 0;
}
Structure SYSTEM_POWER_STATUS_EX
Public TODO
End Structure
None.
AC power status. It is one of the following values.
Value | Description |
0 | Offline |
1 | Online |
255 | Unknown status |
All other values are reserved.
const uint AC_LINE_OFFLINE = 0x00;
const uint AC_LINE_ONLINE = 0x01;
const uint AC_LINE_BACKUP_POWER = 0x02;
const uint AC_LINE_UNKNOWN = 0xFF;
Battery charge status. It can be a combination of the following values:
Percentage of full battery charge remaining. This member can be a value in the range 0 to 100, or 255 if status is unknown. All other values are reserved.
Reserved; set to zero.
Number of seconds of battery life remaining, or 0xFFFFFFFF if remaining seconds are unknown.
Number of seconds of battery life when at full charge, or 0xFFFFFFFF if full lifetime is unknown.
Reserved; set to zero.
Backup battery charge status. It can be a combination of the following values:
const uint BATTERY_FLAG_HIGH = 0x01;
const uint BATTERY_FLAG_LOW = 0x02;
const uint BATTERY_FLAG_CRITICAL = 0x04;
const uint BATTERY_FLAG_CHARGING = 0x08;
const uint BATTERY_FLAG_NO_BATTERY = 0x80;
const uint BATTERY_FLAG_UNKNOWN = 0xFF;
const uint BATTERY_PERCENTAGE_UNKNOWN = 0xFF;
const uint BATTERY_LIFE_UNKNOWN = 0xFFFFFFFF;
Percentage of full backup battery charge remaining. Must be in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN.
Reserved; set to zero
Number of seconds of backup battery life remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown.
Number of seconds of backup battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime is unknown.