Microsoft Windows CE 3.0  

BatteryDrvrGetStatus

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 status of the main and backup batteries.

BOOL BatteryDrvrGetStatus(
PSYSTEM_POWER_STATUS_EX2
pStatus
,
PBOOL
pfBatteriesChangedSinceLastCall
);

Parameters

pStatus
Pointer to the return buffer containing the battery status information.
pfBatteriesChangedSinceLastCall
Pointer to a flag that the function sets to TRUE if the system's batteries have been replaced or changed since the last call to this function.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

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

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_EX2structure, instead of the BATTERY_STATUSstructure, 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
);

Parameters

pSystemPowerStatusEx
Pointer to the buffer in which the battery status information is to be returned.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Battery.h   Acmdwrap.lib
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.

See Also

BATTERY_STATUS



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.