Monitoring 如何使用c#从Bios获取CPU温度信息?

Monitoring 如何使用c#从Bios获取CPU温度信息?,monitoring,c#,Monitoring,C#,如何使用c从Bios中获取CPU温度信息#我尝试了一下中的代码 但是没有运气枚举数。当前引发异常 我怎样才能做到这一点?谢谢 错误: "This system doesn't support the required WMI objects(1) - check the exception file Not supported at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus e

如何使用c从Bios中获取CPU温度信息#我尝试了一下中的代码

但是没有运气<代码>枚举数。当前引发异常

我怎样才能做到这一点?谢谢

错误:

"This system doesn't support the required WMI objects(1) - check the exception file 
Not supported 

 at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
 at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
 at CedarLogic.WmiLib.SystemStatistics.RefreshReadings() in D:\Downloads\TempMonitorSrc\TemperatureMonitorSln\WmiLib\SystemStatistics.cs:line 25
 at CedarLogic.WmiLib.SystemStatistics.get_CurrentTemperature() in D:\Downloads\TempMonitorSrc\TemperatureMonitorSln\WmiLib\SystemStatistics.cs:line 87
 at TemperatureMonitor.SystemTrayService.CheckSupport() in D:\Downloads\TempMonitorSrc\TemperatureMonitorSln\TemperatureMonitor\SystemTrayService.cs:line 260"

我遇到了完全相同的问题:

您引用的链接中的代码是正确的。My.exe在Windows/XP和Windows/Vista上运行良好(只要我在Vista上“以管理员身份运行”)。。。但在Windows Embedded 7上由于WMI错误“不受支持”而失败


此时,我不知道问题是操作系统(WES7)还是主板(Intel DH57jg)。

虽然不理想,但我找到的最接近/最好的解决方案是使用(免费),它可以通过内存映射将探测信息公开给外部应用程序。有人做了C#转换:

“以我在报告中所说的为基础 上一篇文章,假设我们想 访问SpeedFan提供的数据 来自C#应用程序。作为小型 除此之外,阅读来自 SMBus和其他低级接口 只能从内核完成。所以 应用程序,如SpeedFan(HWMonitor、, 珠穆朗玛峰等)通常运行 内核级的驱动程序,然后是 前端GUI,用于显示 信息

对于SpeedFan,共享内存 (实际上,这是一种记忆 Windows上的映射文件(我认为)是 用于在内核之间进行通信 驱动程序和用户空间GUI 应用程序。更好的是,格式 此文件的副本已由发布 SpeedFan的作者,够了 说吧,让我们看看代码!”


请查看。

这在StackOverflow.com上更合适