Share via


BatteryGetLifeTimeInfo

This function retrieves the time the batteries were last changed, the amount of time the batteries have been in use, and the amount of time the batteries were in use before being replaced.

BOOL BatteryGetLifeTimeInfo ( 
LPSYSTEMTIME pstLastChange, 
DWORD *pcmsCpuUsage, 
DWORD *pcmsPreviousCpuUsage );

Parameters

  • pstLastChange
    Pointer to the local time when the batteries were last changed.
  • pcmsCpuUsage
    Pointer to the amount of time the current batteries have been in active use.
  • pcmsPreviousCpuUsage
    Pointer to the amount of time the previous batteries were in active use before being replaced, or zero if unknown.

Return Values

TRUE indicates success; FALSE indicates failure.

Remarks

To use this function, your operating system must have a battery driver.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.10 and later Pwinuser.h    

See Also

BatteryDrvrGetStatus

 Last updated on Friday, April 02, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.