IWDTFSimulatedBatterySystemAction::SetSimulatedBatteryChargePercentage method (wdtfsimulatedbatterysystemaction.h)
Sets the charge percentage reported to the OS by the simulated battery.
Use this method to change the charge level reported to the OS by the simulated battery. This is useful for testing software behavior that changes based on the battery charge level.
Syntax
HRESULT SetSimulatedBatteryChargePercentage(
[in] ULONG Percent,
[out, retval] VARIANT_BOOL *pbSuccess
);
Parameters
[in] Percent
Specifies charge level percentage, 0-100.
[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 |