How can I use C++ to control CPU fan speed in Windows Vista Ultimate? I would like to use ACPI.
+5
A:
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:
- SetSpeed Method of the CIM_Fan Class
- WMI C++ Application Examples
- Example: Calling a Provider Method
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.
No 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.
Check out the program motherboard monitor for clues on how to get started. It's nontrivial, since every motherboard and bios is different.
Adam Davis
2009-04-24 18:14:49
He didn't say API, he said ACPI: http://en.wikipedia.org/wiki/ACPI
Ben S
2009-04-24 18:17:05
Exactly. The API for controlling fans is ACPI. If he doesn't want to use the API that's designed to provide fan control, he's got a lot of work ahead of him.
Adam Davis
2009-04-24 18:20:33
Nevertheless edited for clarity.
Adam Davis
2009-04-24 18:21:05
"I want using ACPI" sounds to me like he wants to use it... possibly anyway... ^^
Oskar Duveborn
2009-04-24 18:28:35
Ah, I interpretted it as, "I won't use ACPI"...
Adam Davis
2009-04-24 18:36:27
Also note that support for this will vary by mother board and BIOS implementation. Not all systems will support this; some not at all; some will have bugs.
Foredecker
2009-04-24 18:45:45