This function returns the status of the main and backup batteries.
BOOL BatteryDrvrGetStatus( PSYSTEM_POWER_STATUS_EX2 pStatus,
PBOOL pfBatteriesChangedSinceLastCall );
TRUE indicates success. FALSE indicates failure.
Implement this GWES-layer function as part of porting native device drivers. This function is declared in the Battery.h header file.
The syntax for this function is different in Windows CE version 2.12 than in previous versions of the operating system. This function now uses the SYSTEM_POWER_STATUS_EX2 structure instead of the BATTERY_STATUS structure to return the battery status. The new structure contains additional fields to support batteries that can report complex status information. If you are writing a battery driver for a previous version of Windows CE, you should use the following definition of the function BatteryDrvrGetStatus:
BOOL BatteryDrvrGetStatus( PBATTERY_STATUS pSystemPowerStatusEx );