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

Title Description
IOCTL_CAD_DISABLE_CHARGING This IOCTL is for internal use only.
IOCTL_CAD_GET_BATTERY_PROVISIONING_STATUS This IOCTL is for internal use only.
IOCTL_CAD_GET_CHARGING_STATUS_COMPLETE This IOCTL is for internal use only.
IOCTL_CAD_POWER_SOURCE_UPDATE_EX This IOCTL is for internal use only.
IOCTL_INTERNAL_CAD_POWER_SOURCE_UPDATE This IOCTL is for internal use only.
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

Title Description
POWERSOURCEID This enum is for internal use only.

Functions

Title Description
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

Title Description
BATTERYPROVISIONINGSTATUS This structure is for internal use only.
CAD_POWER_SOURCE_INFO This structure is for internal use only.
CAD_POWER_SOURCE_INFO_USB This structure is for internal use only.
CHARGINGSTATUSCOMPLETE This structure is for internal use only.
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 This structure is for internal use only.
POWERSOURCEUPDATEEX This structure is for internal use only.