为什么得不到 Win32_Fan的信息?
哪位高手熟悉 win32 和dom开发里的有关WMI的知识? 帮我看看为何用以下代码得不到有关Win32_Fan 的信息, 但用同种方法可以得到硬盘和cdrom的信息?以下是c#的代码,由于太急所以也在这里留贴了,望大家谅解并帮助.
ConnectionOptions oConn = new ConnectionOptions();
System.Management.ManagementScope oMs = new System.Management.ManagementScope("\\\\localhost", oConn);
System.Management.ObjectQuery oQuery = new System.Management.ObjectQuery("SELECT * FROM Win32_Fan");
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMs, oQuery);
ManagementObjectCollection oReturnCollection = oSearcher.Get();
Console.WriteLine(oReturnCollection.);
foreach (ManagementObject oReturn in oReturnCollection)
{
Console.WriteLine(oReturn["DesiredSpeed"].ToString());
Console.WriteLine(oReturn["Description"].ToString());
Console.WriteLine(oReturn["DeviceID"].ToString()); --------------------编程问答-------------------- up --------------------编程问答-------------------- 咋没人回答啊? wmi win32_Fan 风扇信息为什么返回值为0
是主板不支持,还是命令不正确啊! 版主这个问题怎么解决的?
补充:.NET技术 , VC.NET