Partager via


BatteryGetLifeTimeInfo

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.

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 Values

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

OS Versions: Windows CE 2.10 and later.
Header: Pwinuser.h.
Link Library: Coredll.lib.

See Also

Battery Drivers | BatteryPDDGetStatus | BatteryDrvrSupportsChangeNotification | SYSTEMTIME

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.