共用方式為


IWDTFSimulatedBatterySystemAction::EnableSimulatedBattery 方法 (wdtfsimulatedbatterysystemaction.h)

啟用模擬電池。

使用此方法啟用模擬電池(安裝模擬電池裝置)。 這不保證能夠自行模擬DC,IWDTFSimulatedBatterySystemAction::D isableRealBatteries 方法也必須呼叫 ,以確保實際電池不會干擾模擬。

語法

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

參數

[out, retval] pbSuccess

傳回值

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

IWDTFSimulatedBatterySystemAction::D isableRealBatteries

要求

要求 價值
最低支援的用戶端 Windows 8.1
支援的最低伺服器 Windows Server 2012 R2
目標平臺 桌面
標頭 wdtfsimulatedbatterysystemaction.h