BatteryDrvrGetLevels

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.

LONG BatteryDrvrGetLevels(void);

Parameters

None.

Return Values

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

OS Versions: Windows CE 2.0 and later.
Header: Battery.h.
Link Library: Coredll.lib.

See Also

GetSystemPowerStatusEx2 | SYSTEM_POWER_STATUS_EX2 | Battery Drivers

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.