IWDTFSimulatedBatterySystemAction::SetSimulatedBatteryToAC method (wdtfsimulatedbatterysystemaction.h)

Sets the simulated battery status to AC power.

Use this method to set the simulated battery status to AC power. If real batteries in the system are disabled, this sets the OS status and policy to AC power. This is useful for testing software behavior that changes depending on the AC/DC state.

Syntax

HRESULT SetSimulatedBatteryToAC(
  [out, retval] VARIANT_BOOL *pbSuccess
);

Parameters

[out, retval] pbSuccess

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows 8.1
Minimum supported server Windows Server 2012 R2
Target Platform Desktop
Header wdtfsimulatedbatterysystemaction.h