Share via


BatteryGetLifeTimeInfo (Compact 2013)

3/26/2014

This function retrieves the time the user changed the batteries, the amount of time they used the batteries, and the amount of time they used the batteries before replacing them.

Syntax

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

Parameters

  • pstLastChange
    [out] Pointer to the local time when the user last changed the batteries.
  • pcmsCpuUsage
    [out] Pointer to the number of milliseconds that the current batteries have been in active use.
  • pcmsPreviousCpuUsage
    [out] Pointer to the number of milliseconds that the previous batteries were in active use before the user replaced them, or zero if unknown.

Return Value

None.

Remarks

To use this function, your operating system must have a battery driver. This function only returns useful information if BatteryDrvrSupportsChangeNotification returns TRUE.

Requirements

Header

pwinuser.h

Library

coredll.lib

See Also

Reference

Battery Driver Functions
BatteryPDDGetStatus
BatteryDrvrSupportsChangeNotification

Other Resources

SYSTEMTIME