CeGetSystemPowerStatusEx

The CeGetSystemPowerStatusEx function retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether or not the batteries are currently charging, and the remaining life of main and backup batteries. This is the RAPI version of the GetSystemPowerStatusEx function.

Syntax

BOOL CeGetSystemPowerStatusEx(PSYSTEM_POWER_STATUS_EX pstatus, BOOL fUpdate);

At a Glance

Header file: Rapi.h
Platforms: H/PC
Windows CE versions: 2.0 and later

Parameters

pstatus
Pointer to the SYSTEM_POWER_STATUS_EX structure receiving the power status information.
fUpdate
If this parameter is set to TRUE, CeGetSystemPowerStatusEx gets the latest information from the device driver, otherwise it retrieves cached information that may be out-of-date by several seconds.

Return Values

This function returns TRUE if successful, otherwise FALSE.

Remarks

When writing applications for Windows CE versions 1.0 and 1.01, use the PegGetSystemPowerStatusEx function.

For more information about using RAPI functions, see Invoking Functions from a Desktop Computer.

See Also

GetSystemPowerStatusEx, SYSTEM_POWER_STATUS_EX