windows 如何在 Vista 中使用 C++ 控制我的 PC 的风扇速度?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/786984/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:21:12  来源:igfitidea点击:

How can I control my PC's fan speed using C++ in Vista?

c++windowscpuwindows-vista

提问by Adam Davis

How can I use C++ to control CPU fan speed in Windows Vista Ultimate? I would like to use ACPI.

如何在 Windows Vista Ultimate 中使用 C++ 控制 CPU 风扇速度?我想使用 ACPI。

回答by Adam Davis

ACPI:

ACPI:

You need to learn about and use the WMI - Windows system management interface. Here are a few resources that will give you clues on where to start:

您需要了解和使用 WMI - Windows 系统管理界面。以下是一些资源,可为您提供有关从哪里开始的线索:

Note that some motherboards don't support fan speed changes, and even those that do may not expose this to the WMI. In the best case you may still have to detect the motherboard type and talk to the fan management controllers directly.

请注意,某些主板不支持风扇速度更改,即使是那些支持更改的主板也可能不会将其暴露给 WMI。在最好的情况下,您可能仍然需要检测主板类型并直接与风扇管理控制器对话。

No ACPI:

没有 ACPI:

If you don't want to use ACPI then you're going to have to write your own code to access the SMBUS on the motherboard, and then control the fan controller chips.

如果您不想使用 ACPI,那么您将不得不编写自己的代码来访问主板上的 SMBUS,然后控制风扇控制器芯片。

Check out the program motherboard monitor for clues on how to get started. It's nontrivial, since every motherboard and bios is different.

查看程序主板监视器以获取有关如何开始的线索。这很重要,因为每个主板和 bios 都是不同的。