开发者

how to get cpu temperature in c/c++/vb.net/c#?

How can I get the cpu temperature using c/c++/vb开发者_JAVA百科.net/c# ? I already found this link Get CPU Temperature in .Net, but I'm not sure if it really works.

Also I would like to know if there is a way other than using wmi queries.


It can be done in your code via WMI. I've found a tool from Microsoft that creates code for it.

The WMI Code Creator tool allows you to generate VBScript, C#, and VB .NET code that uses WMI to complete a management task such as querying for management data, executing a method from a WMI class, or receiving event notifications using WMI.

You can download it here.


It does not appear possible to use the Win32_TemperatureProbe wmi class, at least when I query it I get nothing back, and this appears to be common.

I found this custom c# driver someone wrote for retrieving the information:

http://temperature.myweb.hinet.net/index_en.htm

It includes the source code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜