禁用 ACPI 电源按钮

发布于 2024-07-26 23:40:52 字数 89 浏览 4 评论 0原文

是否有任何简单的方法可以使用 Visual C++ 中的 Windows API 暂时禁用处理 ACPI 电源按钮事件(关机),以便用户无法使用电源按钮关闭计算机?

is there any simple way to disable processing ACPI power button events (Shutdown) temporarily using the Windows API in Visual C++, so the user isn't able to shut down the computer using the power button?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

划一舟意中人 2024-08-02 23:40:52

简而言之,不。

稍微长一点的解释是,ACPI 规范有一个声明(解释一下)“按住电源按钮 4 秒必须关闭电源”。

In short, No.

A slightly longer explanation states that the ACPI spec has a statement (to paraphrase) "pressing and holding the power button for 4 seconds must turn the power off".

小帐篷 2024-08-02 23:40:52

您可能必须覆盖 DSDT 命名空间中嵌入式控制器的 _qxx 方法,以抑制 BIOS 向操作系统 acpi 驱动程序发送通知(80),然后以编程方式关闭系统。 这就是触发关闭序列的原因。 每次启动时,ACPI 表都会缓存在注册表中,并且相同的注册表机制也支持覆盖。

you probably would have to override embedded controller's _qxx method in DSDT namespace to suppress the BIOS sending a notify(80) to the OS acpi driver, which then shuts down the system programatically. This is what triggers the shutdown sequence. ACPI tables are cached in the registry on every boot and the same registry mechanism also supports overriding.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文