如何在VC ++或PowerShell中禁用或启用“允许计算机关闭此设备以节省电量”? [英] How to disable or enable “allow the computer to turn off this device to save power” in VC++ or powershell ?
本文介绍了如何在VC ++或PowerShell中禁用或启用“允许计算机关闭此设备以节省电量”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想为USB / USBHUB设备禁用或启用"允许计算机关闭此设备以节省电量"。
VC ++ / MFC或powershell中的方法是什么?
推荐答案
您好LDZ2012,
Hi LDZ2012,
感谢您在此处发帖。
>>我想为USB / USBHUB设备禁用或启用"允许计算机关闭此设备以节省电量"。
VC ++中的方法是什么? / MFC或powershell
对于这种情况,我建议你使用
CIM_USBDevice类,它代表USB设备的管理特性。您可以使用
SetPowerState CIM_USBDevice类的
方法,它为逻辑设备设置所需的电源状态,以及何时将设备置于该状态。
For this case, I suggest you use CIM_USBDevice class which represents the management characteristics of a USB device. You could use the SetPowerState method of the CIM_USBDevice class which sets the desired power state for a logical device and when a device should be put into that state.
希望这可能有所帮助你好。
Hope this could be help of you.
最好的问候,
Sera Yu
这篇关于如何在VC ++或PowerShell中禁用或启用“允许计算机关闭此设备以节省电量”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文