Battery
A battery typically has a pair of drivers: the generic battery class driver that Microsoft provides, and a miniclass driver written specifically for that individual type of battery.
The class driver defines the overall functionality of the batteries in the system and interacts with the power manager.
To develop Battery, you need these headers:
For the programming guide, see Battery Devices Design Guide.
IOCTLs
IOCTL_CAD_DISABLE_CHARGING This IOCTL is for internal use only. |
IOCTL_CAD_GET_BATTERY_PROVISIONING_STATUS Microsoft reserves the IOCTL_CAD_GET_BATTERY_PROVISIONING_STATUS system call for internal use only. Don't use this system call in your code. |
IOCTL_CAD_GET_CHARGING_STATUS_COMPLETE Microsoft reserves the IOCTL_CAD_GET_CHARGING_STATUS_COMPLETE system call for internal use only. Don't use this system call in your code. |
IOCTL_CAD_POWER_SOURCE_UPDATE_EX Microsoft reserves the IOCTL_CAD_POWER_SOURCE_UPDATE_EX system call for internal use only. Don't use this system call in your code. |
IOCTL_INTERNAL_CAD_POWER_SOURCE_UPDATE Microsoft reserves the IOCTL_INTERNAL_CAD_POWER_SOURCE_UPDATE system call for internal use only. Don't use this system call in your code. |
IOCTL_INTERNAL_CONFIGURE_CHARGER_PROPERTY The IOCTL_INTERNAL_CONFIGURE_CHARGER_PROPERTY control code is sent from a configurable charger to a device that handles configurable chargers. It configures charger properties. |
Enumerations
POWERSOURCEID This enum is for internal use only. |
Functions
UPSCancelWait The UPSCancelWait function cancels all waits initiated by calls to UPSWaitForStateChange. |
UPSGetState The UPSGetState function returns the operational state of the UPS. |
UPSInit The UPSInit function initializes a UPS minidriver, opens communication to the UPS unit, updates the registry, and causes the minidriver to start monitoring the UPS unit. |
UPSStop The UPSStop function causes a UPS minidriver to stop monitoring its UPS unit. |
UPSTurnOff The UPSTurnOff function turns off the UPS unit's power outlets, after a specified delay time. |
UPSWaitForStateChange The UPSWaitForStateChange function waits until a specified UPS state changes, or until a time-out interval elapses. |
Structures
BATTERY_REPORTING_SCALE Battery miniclass drivers fill in the BATTERY_REPORTING_SCALE (wdm.h) structure in response to certain BatteryMiniQueryInformation requests. |
BATTERYPROVISIONINGSTATUS Microsoft reserves the BATTERYPROVISIONINGSTATUS structure for internal use only. Don't use this structure in your code. |
CAD_POWER_SOURCE_INFO Microsoft reserves the CAD_POWER_SOURCE_INFO structure for internal use only. Don't use this structure in your code. |
CAD_POWER_SOURCE_INFO_USB Microsoft reserves the CAD_POWER_SOURCE_INFO_USB structure for internal use only. Don't use this structure in your code. |
CHARGINGSTATUSCOMPLETE Microsoft reserves the CHARGINGSTATUSCOMPLETE structure for internal use only. Don't use this structure in your code. |
CONFIGURABLE_CHARGER_PROPERTY_HEADER The CONFIGURABLE_CHARGER_PROPERTY_HEADER structure is a header that is used to create your own structure as an input to IOCTL_INTERNAL_CONFIGURE_CHARGER_PROPERTY. |
POWERSOURCESTATUS This struct is for internal use only. |
POWERSOURCEUPDATE Microsoft reserves the POWERSOURCEUPDATE structure for internal use only. Don't use this structure in your code. |
POWERSOURCEUPDATEEX Microsoft reserves the POWERSOURCEUPDATEEX structure for internal use only. Don't use this structure in your code. |