| Platform SDK: Hardware |
The BATTERY_WAIT_STATUS structure indicates when the battery status is to be collected and returned by the operation. It is an input to the IOCTL_BATTERY_QUERY_STATUS operation.
typedef struct _BATTERY_WAIT_STATUS {
ULONG BatteryTag;
ULONG Timeout;
ULONG PowerState;
ULONG LowCapacity;
ULONG HighCapacity;
} BATTERY_WAIT_STATUS, *PBATTERY_WAIT_STATUS;
If the computer has entered sleep mode, the clock will continue to run, but exhausting the count will not wake the computer up. If the count is exhausted when the computer is awoken, and other conditions are satisfied, the call will return immediately on awakening.
| Value | Meaning |
|---|---|
| BATTERY_POWER_ON_LINE | Indicates that the battery has access to AC power. |
| 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. |
Requests for battery information are postponed until one of the following occurs:
When any one of these conditions is satisfied, the data is collected and the operation returns. This allows applications to monitor typical dynamic battery information without polling the device.
Before using either of the two Capacity conditions, make sure the battery supports them by calling the IOCTL_BATTERY_QUERY_STATUS DeviceIoControl operation with a time-out of zero. Examine the results to determine if the Capacity element is supported (that is, not BATTERY_UNKNOWN_CAPACITY).
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, IOCTL_BATTERY_QUERY_TAG, Battery Tags