Microsoft Windows CE 3.0  

BatteryDrvrGetLevels

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function returns the number of levels that the battery driver is capable of returning in the BatteryFlagand BackupBatteryFlagmembers of the BATTERY_STATUSstructure.

LONG BatteryDrvrGetLevels(void);

Return Values

Contains the number of levels that the BatteryDrvrGetStatusfunction can return in the BatteryFlagmember of BATTERY_STATUS. The low-order WORDcontains the number of levels that can be returned for the main battery, and the high-order WORDcontains the number of levels that can be returned for the backup battery.

The number of levels that can be returned ranges from 0 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 BATTERY_FLAG_CRITICAL can also be returned, the value is 3.

Remarks

The BATTERY_FLAG_CHARGING, BATTERY_FLAG_NO_BATTERY, and BATTERY_FLAG_UNKNOWN values are ignored for the purposes of this count.

Implement this GWES function as part of porting native device drivers.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Battery.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.


 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.