BatteryDrvrGetLevels (Windows Embedded CE 6.0)
1/6/2010
This function returns the number of levels that the battery driver is capable of returning in the BatteryFlag and BackupBatteryFlag members of the SYSTEM_POWER_STATUS_EX2 structure.
Syntax
LONG BatteryDrvrGetLevels(void);
Parameters
None.
Return Value
Contains the number of levels that the GetSystemPowerStatusEx2 function can return in the BatteryFlag member of SYSTEM_POWER_STATUS_EX2. The low-order WORD contains the number of levels that this function can return for the main battery, and the high-order WORD contains the number of levels that this function can return for the backup battery.
The number of levels that this function can return ranges from zero through 3. For example, if only the two values BATTERY_FLAG_HIGH and BATTERY_FLAG_LOW can be returned, the return value is 2. If this function can also return BATTERY_FLAG_CRITICAL, the value is 3. The BATTERY_FLAG_CHARGING, BATTERY_FLAG_NO_BATTERY, and BATTERY_FLAG_UNKNOWN values are ignored for the purposes of this count.
Remarks
In this example of BatteryDrvrGetLevels, the function takes no arguments. This function returns the number of levels that the battery driver can return in the BatteryFlag and BackupBatteryFlag members of the SYSTEM_POWER_STATUS_EX2 structure.
Requirements
Header | battery.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 2.0 and later |