IWDTFSimulatedBatterySystemAction::SetSimulatedBatteryToDC method (wdtfsimulatedbatterysystemaction.h)

Sets the simulated battery status to DC power.

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

Syntax

HRESULT SetSimulatedBatteryToDC(
  [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