Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This structure specifies information about the power status of the system.
typedef struct { BYTE ACLineStatus; BYTE BatteryFlag; BYTE BatteryLifePercent; BYTE Reserved1; DWORD BatteryLifeTime; DWORD BatteryFullLifeTime; BYTE Reserved2; BYTE BackupBatteryFlag; BYTE BackupBatteryLifePercent; BYTE fBatteriesChangedSinceLastCall; DWORD BackupBatteryLifeTime; DWORD BackupBatteryFullLifeTime; } BATTERY_STATUS;
Members
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.
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. |
All other values are reserved.
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. |
All other values are reserved.
Value | Description |
---|---|
TRUE (1) | Indicates that the batteries have been changed since the last time the BatteryDrvrGetStatusfunction was called. |
FALSE (0) | Indicates that the batteries have not been changed. |
Usually, the driver determines this bit during an interrupt process. When a Battery Cover Opened interrupt occurs, the interrupt service routine (ISR) sets a global variable to indicate that the cover has been opened. The next time BatteryDrvrGetStatusis called, the driver sets fBatteriesChangedSinceLastCallto TRUE and resets variable. If the global variable was not set, fBatteriesChangedSinceLastCallis set to FALSE.
Remarks
This GWES data structure is implemented as part of porting native device drivers.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Battery.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.
Last updated on Tuesday, July 13, 2004