TwclPowerEventsMonitor.GetPowerStatus(TwclPowerStatus) Method

Retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether the battery is currently charging, how much battery life remains, and if battery saver is on or off.

Namespace: wclPowerEvents
public
 function GetPowerStatus(out Status: TwclPowerStatus): Integer;

Parameters

Status
Type: TwclPowerStatus

A TwclPowerStatus structure that receives status information.

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.