Anthony,
You can use WMI if your hardware is compliant. Use the wbemtest.exe
utility to confirm whether or not you can even retrieve the
temperature. There are two ways I know of to retrieve the temperature
information.
1) Using wbemtest.exe connect to the namespace "root\cimv2" (without
quotes). Click the Query button and enter "select * from
Win32_TemperatureProbe". Double click on any result you get back and
look for the CurrentReading property in the properties section. The
value you see there should be the temperature. If it just shows
"<null>" then this option will not work.
2) Using wbemtest.ext connect to the namespace "root\WMI". Enter the
query "select * from MSAcpi_ThermalZoneTemperature". Double click on
any result you get back and look for the CurrentTemperature property.
The value is in tenths of degrees Kelvin.
Using #2 I can see that I have 3 temperature probes in my laptop. I
can view their values in .NET using the following code. I apologize in
advance for using C# in VB forum.
// Reference the System.Management.dll assembly first.
using System.Management;
public class Temperature
{
public static void Main()
{
string scope = @"root\WMI";
string query = @"select * from MSAcpi_ThermalZoneTemperature";
ManagementObjectSearcher searcher = new
ManagementObjectSearcher(scope, query);
foreach (ManagementObject obj in searcher.Get())
{
Console.WriteLine(obj.Properties["CurrentTemperature"].Value);
}
}
}
Brian
One the computer I am programmig I could see the CPU temperature in
the BIOS, is there a system DLL in VB.NET that I can call to
display the temperature in my software?
Thanks!