Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何简单的方法可以暂时使用 Visual C++ 中的 Windows API 来禁用处理 ACPI 电源按钮事件(关机),因此用户无法使用电源按钮关闭计算机?
简而言之,不。
稍长一点的解释指出,ACPI 规范有一个声明(解释)“按住电源按钮 4 秒钟必须关闭电源”。
您可能必须在 DSDT 命名空间中覆盖嵌入式控制器的 _qxx 方法,以抑制 BIOS 向操作系统 acpi 驱动程序发送通知(80),然后以编程方式关闭系统。这就是触发关闭序列的原因。ACPI 表在每次启动时都缓存在注册表中,并且相同的注册表机制也支持覆盖。