重写 SetThreadExecutionState
我不确定这是否属于服务器故障或超级用户。
我想将 SetThreadExecutionState(ES_DISPLAY_REQUIRED) 重写为无操作。这是如何实现的?
是否有一些注册表设置可以更改而不是 API 挂钩?
阻止 ES_DISPLAY_REQUIRED 将阻止应用程序保持显示器开机。我有一个应用程序(可能是防病毒软件)阻止某些显示器进入省电模式,我认为这个功能是罪魁祸首。
I am not sure if this belongs on serverfault or superuser.
I would like to override SetThreadExecutionState(ES_DISPLAY_REQUIRED) to be a no-op. How is this accomplished?
Is there some registry setting that can be altered instead of API hooking?
Blocking ES_DISPLAY_REQUIRED will prevent apps from keeping the monitor powered on. I have an application (likely the antivirus) that is preventing some monitors from entering power-save and I think this function is the culprit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您走得太远之前,您是否已确认它是防病毒软件?如果您使用的是 Windows Vista 或 Windows 7,请使用 POWERCFG.EXE /REQUESTS(以管理员身份)进行检查。
另外,此帖子,链接到 此文档,表示使用 POWERCFG.EXE /REQUESTSOVERRIDE 来否决 SetThreadExecutionState。
Before you get too far down that road, have you confirmed that it is the antivirus? If you're on Windows Vista or Windows 7, use POWERCFG.EXE /REQUESTS (as administrator) to check.
Also, this thread, which links to this document, says to use POWERCFG.EXE /REQUESTSOVERRIDE to veto SetThreadExecutionState.