如何从CPU获取硬件信息,如温度,电压,FanSpeed。代码。 [英] How to Get HardWare Information from CPU like Temparature,Voltage,FanSpeed. code in .

查看:103
本文介绍了如何从CPU获取硬件信息,如温度,电压,FanSpeed。代码。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此代码...

// ---代码--- //

I was using This Code...
//---Code---//

展开 | 选择 | 换行 | 行号

推荐答案

一个明显的错误 - 你错误拼写了WMI类名 - 它是Win32_TemperatureProbe (Tempe not Tempa)。


有关温度探测器的信息,请查看:

http://msdn.microsoft.com/en-us/ library / aa394493(VS.85).aspx


还有一个Win32_Fan类的风扇速度(不确定这是不是你想要的......):

http://msdn.microsoft.com/en-us/library/aa394146(VS.85).aspx


还有一个用于CPU电压的Win32_Processor:

http://msdn.microsoft.com/en-us/library/aa394373(VS.85).aspx


HTH
One obvious thing wrong - you have mis-spelt the WMI class name - it is "Win32_TemperatureProbe" (Tempe not Tempa).

For information about the temperature probe, check out:
http://msdn.microsoft.com/en-us/library/aa394493(VS.85).aspx

There is also a Win32_Fan class for fan speed (not sure if this is what you want...):
http://msdn.microsoft.com/en-us/library/aa394146(VS.85).aspx

And also a Win32_Processor for CPU voltage:
http://msdn.microsoft.com/en-us/library/aa394373(VS.85).aspx

HTH


Win32_TemperatureProbe在root \ CYV2下而不是root \ WMI

我对此感兴趣一段时间,直到我发现我的戴尔桌面不包含任何可访问的临时探测器。它包含一个风扇和一个硬盘温度(如果有人知道如何获得硬盘温度,我很乐意听到它)
Win32_TemperatureProbe is under root\CIMV2 not root\WMI
I was very interested in this for awhile, until I discovered that my Dell desktop does not contain any accessible temp probes. It contains ONE fan and one harddrive temp(which if anyone knows how to get at the harddrive temp, I would love to hear it)



Win32_TemperatureProbe在root \ CYV2下而不是root \ WMI

我对此感兴趣了一段时间,直到我发现我的戴尔桌面不包含任何可访问的临时探测器。它包含一个风扇和一个硬盘温度(如果有人知道如何获得硬盘温度,我很乐意听到它)
Win32_TemperatureProbe is under root\CIMV2 not root\WMI
I was very interested in this for awhile, until I discovered that my Dell desktop does not contain any accessible temp probes. It contains ONE fan and one harddrive temp(which if anyone knows how to get at the harddrive temp, I would love to hear it)



注意:此代码仅为在我的Western Digital 120GB硬盘上测试过,可能无法在其他硬盘上运行!此外,您需要添加System.Management作为参考(右键单击WindowsApplication1并选择Add Reference)



***不是我的代码


NOTE: This code is only tested on my Western Digital 120GB hard drive, and may not work on others! Also, you need to add System.Management as a reference (right-click on WindowsApplication1 and choose Add Reference)


*** Not my code

展开 | 选择 | Wrap | 行号


这篇关于如何从CPU获取硬件信息,如温度,电压,FanSpeed。代码。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆