Platform SDK: Hardware

BATTERY_REPORTING_SCALE

The BATTERY_REPORTING_SCALE structure reports the remaining capacity and the capacity-reporting granularity that the hardware supports. The data returned from the IOCTL_BATTERY_QUERY_INFORMATION operation with the BatteryInformation information level is a variable-length array of BATTERY_REPORTING_SCALE structures. The lower ordinal entries hold older samples.

typedef struct {
  ULONG       Granularity;
  ULONG       Capacity;
} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;

Members

Granularity
The granularity of the capacity reading represented by this sample, in milliwatt hours (mWh). Granularity may change over time as battery discharge and recharge lowers the range of readings.
Capacity
The difference in capacity between this sample and the previous sample, indicated in mWh. It may be a positive nonzero value, indicating that the battery is charging, or a negative value, indicating that the battery is discharging. It may also be zero, indicating that the granularity is not sufficient to report discharge from normal internal charge leakage.

Remarks

The total number of entries is indicated by the value returned in the DeviceIoControl lpBytesReturned parameter. Divide the value in lpBytesReturned by the size of the BATTERY_REPORTING_SCALE structure to determine the number of elements in the array.

The maximum number of array entries from any DeviceIoControl call is four.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Batclass.h.

See Also

Device Input and Output Overview, Device Input and Output Structures, DeviceIoControl, IOCTL_BATTERY_QUERY_INFORMATION, BATTERY_REPORTING_SCALE