So I made a program with WPF, C# and WMI as a small project to gather the specifications of a computer, and put it on SourceForge because it was of little use to me.
I soon discovered that SoftPedia had picked it up, and noticed in their screenshot that there was an error with the voltage reading. This is an image nicked from their page:
http://i.stack.imgur.com/8QpBq.png
At the moment I source the voltage by using "CurrentVoltage", e.g.
foreach (var item in new ManagementObjectSearcher("Select * from Win32_Processor").Get())
{
labelName.Content = (decimal.Parse(item["CurrentVoltage"].ToString()) / 10).ToString() + " v";
}
As you can see in the image, it's reading as 0v in the picture. I was wondering if I would need to switch "CurrentVoltage" to "VoltageCaps", or if I would need to do something like reading the SMBIOS directly.
If the latter, please specify how to do so, thanks.
Based on the documentation for the Win32_Processor class:
This means that if it reads as
0
when masked with0x80
, then you should use the value fromVoltageCaps
to 'state' the voltage as one of the 3 listed values forVoltageCaps
, unless the result of querying isNULL
, in which case the voltage is unknown.