SYSTEM_POWER_STATUS_EX2

Windows CE 3.0

This structure contains information about the power status of the system.

typedef struct _SYSTEM_POWER_STATUS_EX2 {
BYTE ACLineStatus;
BYTE BatteryFlag;
BYTE BatteryLifePercent;
BYTE Reserved1;
DWORD BatteryLifeTime;
DWORD BatteryFullLifeTime;
BYTE Reserved2;
BYTE BackupBatteryFlag;
BYTE BackupBatteryLifePercent;
BYTE Reserved3;
DWORD BackupBatteryLifeTime;
DWORD BackupBatteryFullLifeTime;
WORD BatteryVoltage; 
DWORD BatteryCurrent;
DWORD BatteryAverageCurrent;
DWORD BatteryAverageInterval;
DWORD BatterymAHourConsumed;
DWORD BatteryTemperature;
DWORD BackupBatteryVoltage;
BYTE  BatteryChemistry;
} SYSTEM_POWER_STATUS_EX2, *PSYSTEM_POWER_STATUS_EX2, *LPSYSTEM_POWER_STATUS_EX2;

Members

ACLineStatus
AC power status. It is one of the following values:
  • AC_LINE_OFFLINE
  • AC_LINE_ONLINE
  • AC_LINE_BACKUP_POWER
  • AC_LINE_UNKNOWN
BatteryFlag
Battery charge status. It is one of the following values:
  • BATTERY_FLAG_HIGH
  • BATTERY_FLAG_LOW
  • BATTERY_FLAG_CRITICAL
  • BATTERY_FLAG_CHARGING
  • BATTERY_FLAG_NO_BATTERY
  • BATTERY_FLAG_UNKNOWN
BatteryLifePercent
Percentage of full battery charge remaining. Must be in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN if percentage of battery life remaining is unknown.
Reserved1
Must be zero.
BatteryLifeTime
Number of seconds of battery life remaining, or BATTERY_LIFE_UNKNOWN if number of seconds of battery life remaining is unknown.
BatteryFullLifeTime
Number of seconds of battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime of battery is unknown.
Reserved2
Must be zero.
BackupBatteryFlag
Backup battery charge status. It is one of the following values:
  • BATTERY_FLAG_HIGH
  • BATTERY_FLAG_LOW
  • BATTERY_FLAG_CRITICAL
  • BATTERY_FLAG_CHARGING
  • BATTERY_FLAG_NO_BATTERY
  • BATTERY_FLAG_UNKNOWN
BackupBatteryLifePercent
Percentage of full backup battery charge remaining. Must be in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN if percentage of backup battery life remaining is unknown.
Reserved3
Must be zero.
BackupBatteryLifeTime
Number of seconds of backup battery life when at full charge, or BATTERY_LIFE_UNKNOWN if number of seconds of backup battery life remaining is unknown.
BackupBatteryFullLifeTime
Number of seconds of backup battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime of backup battery is unknown.
BatteryVoltage
Number of millivolts (mV) of battery voltage. It can range from 0 to 65535.
BatteryCurrent
Number of milliamps (mA) of instantaneous current drain. It can range from 0 to 32767 for charge and 0 to –32768 for discharge.
BatteryAverageCurrent
Average number of milliamps of short term device current drain. It can range from 0 to 32767 for charge and 0 to –32768 for discharge.
BatteryAverageInterval
Number of milliseconds (mS) that is the time constant interval used in reporting BatteryAverageCurrent.
BatterymAHourConsumed
Average number of milliamp hours (mAh) of long-term cumulative average discharge. It can range from 0 to –32768. This value is reset when the batteries are charged or changed.
BatteryTemperature
Battery temperature reported in 0.1 degree Celsius increments. It can range from –3276.8 to 3276.7.
BackupBatteryVoltage
Number of millivolts (mV) of backup battery voltage. It can range from 0 to 65535.
BatteryChemistry
Type of battery. It can be one of the following values:
  • BATTERY_CHEMISTRY_ALKALINE
  • BATTERY_CHEMISTRY_NICD
  • BATTERY_CHEMISTRY_NIMH
  • BATTERY_CHEMISTRY_LION
  • BATTERY_CHEMISTRY_LIPOLY
  • BATTERY_CHEMISTRY_UNKNOWN

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.12 and later Winbase.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetSystemPowerStatusEx2


 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.

Show: