This DLL does not have this call, so this way will fail to search for this name in the library.
According to the Microsoft documentation this method does not is implemented by WMI.
If this method was implemented the code to call it would be this:
using System;
using System.Text;
using System.Management;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
ManagementClass fanClass = new ManagementClass("CIM_Fan");
ManagementBaseObject inParams = fanClass.GetMethodParameters("SetSpeed");
inParams["DesiredSpeed"] = 1000;
ManagementBaseObject outParams = fanClass.InvokeMethod("SetSpeed", inParams, null);
Console.WriteLine("SetSpeed to 1000. returned: " + outParams["returnValue"]);
}
}
}
However, the code fails to execute the InvokeMethod
method because the method is not implemented.
Remembering that you need to include an assembly reference in the project for System.Management
.
Code based in this example .
EDITION:
It seems that it is not possible without writing a driver for Windows, according to this question in SO .