Platform SDK: Hardware |
The BATTERY_SET_INFORMATION structure indicates to the IOCTL_BATTERY_SET_INFORMATION operation which information about the battery is to be set, and the data to which to set it.
typedef struct _BATTERY_SET_INFORMATION { ULONG BatteryTag; BATTERY_SET_INFORMATION_LEVEL InformationLevel; UCHAR Buffer[1]; } BATTERY_SET_INFORMATION, *PBATTERY_SET_INFORMATION;
When a query information request is made, this value is verified. In addition, if the request is in progress while this value changes, the request is aborted with the status of ERROR_FILE_NOT_FOUND.
Information Level | Return |
---|---|
BatteryCriticalBias | Sets the battery's critical bias adjustment. Note it is not envisioned that this value would normally be changed by software, and is present in the interfaces only as a maintenance feature. Not all batteries can maintain such a setting, and the battery information should be read to confirm that the battery accepted the setting. |
BatteryCharge | Setting this value informs the battery device that the user has requested that the battery should be charging at this time. For example, with a smart battery/charger/selector, the application could charge one battery at a time. The Buffer element of this structure is ignored. |
BatteryDischarge | Setting this value informs the battery device that the user has requested that the battery be discharging at this time. For example, this could be used to indicate which battery the user currently wants to power the system. The Buffer element of this structure is ignored. |
The BATTERY_SET_INFORMATION structure is a variable-length structure, and you must allocate a buffer of suitable size for the information you want to include in the structure.
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_SET_INFORMATION