c# / c / c++ / assembly - 检索电压信息?
可能的重复:
wmi c# - WMI 给出不正确的电压读数
首先,是吗?是否可以将 C、C++ 或 Assembly DLL 与 C# 一起使用?
如果是,我是否只需添加对此 DLL 的引用,还是必须 P/Invoke 它?
现在,讨论主要问题。
我注意到,当使用 WMI 和 C# 来检索信息时,在某些体系结构和处理器上,信息要么完全不准确,要么根本不存在。我想知道如果上述问题可能的话,使用 C、C++ 或 Assembly 是否会产生更好的结果。
如果可以的话,我需要写什么,我需要如何写它,如果使用汇编,我将如何将它编译成DLL?感谢您的任何答复。
WMI 不提供“CurrentVoltage”或“VoltageCaps” https://i.sstatic.net/0GJ8E.jpg
Possible Duplicate:
wmi c# - WMI Giving Incorrect Voltage Readings
Firstly, is it possible to use C, C++ or Assembly DLLs with C#?
If it is, would I simply add a reference to this DLL, or would I have to P/Invoke it?
Now, onto the main question.
I have noticed that, when using WMI with C# to retrieve information, on certain architectures and processors the information is either completely inaccurate, or is simply not there. I was wondering if, should the above question be possible, using C, C++ or Assembly would yield better results.
If it would, what I need write, how would I need to write it, and, if using assembly, how would I compile it into a DLL? Thanks for any answers.
WMI does not provide "CurrentVoltage" or "VoltageCaps"
https://i.sstatic.net/0GJ8E.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为你的问题来自于你用来查询 WMI 的语言。
CurrentVoltage
文档 > 属性说:因此,查询 Sandy Bridge / Yorkfield 系统上的
VoltageCaps
属性(因为CurrentVoltage
的第八位未设置)应该可以解决您的问题。I don't think your problem comes from the language you're using to query WMI.
The documentation for the
CurrentVoltage
property says:So, querying the
VoltageCaps
property on the Sandy Bridge / Yorkfield systems (sinceCurrentVoltage
's eighth bit is not set) should solve your problem.