Platform SDK: Hardware |
The BATTERY_STATUS structure indicates the state of the battery at the time the operation returns. It is an output from the IOCTL_BATTERY_QUERY_STATUS operation.
typedef struct _BATTERY_STATUS { ULONG PowerState; ULONG Capacity; ULONG Voltage; LONG Rate; } BATTERY_STATUS, *PBATTERY_STATUS;
Value | Description |
---|---|
BATTERY_POWER_ON_LINE | Indicates that the system has access to AC power, so no batteries are being discharged. |
BATTERY_DISCHARGING | Indicates that the battery is currently discharging. |
BATTERY_CHARGING | Indicates that the battery is currently charging. |
BATTERY_CRITICAL | Indicates that battery failure is imminent. See the Remarks later in this topic for more information. |
The BATTERY_CRITICAL flag in the PowerState member of this structure indicates a hardware "battery critical" condition. This critical level is set by the battery manufacturer, not by the user in the "critical battery alarm." It generally means that the battery system has calculated that the battery is totally drained, and any power being drawn is beyond what is expected. If all of the batteries in a system are critical, and no other source of power is available, the system will be shut down automatically.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Batclass.h.
Device Input and Output Overview, Device Input and Output Structures, DeviceIoControl, IOCTL_BATTERY_QUERY_STATUS