2005
12
02
01
23
ACPI_CPU Temp
以下摘錄自 http://delphi.ktop.com.tw/TOPIC.ASP?TOPIC_ID=59104
今天由一路找 CPU 溫度相關資料
Samurize 之 System Information 的 Scripts & Plugins
http://www.samurize.com/modules/mydownloads/viewcat.php?cid=6
其中 ACPI_CPUTemp by Punkt
' ACPI_CPUTemp v1.0
'
' Reads the CPU temperature from the ACPI data using WMI.
' Returns temp. in celsius.
Function ACPI_CPUTemp()
dim r, lu
set PFU = GetObject("winmgmts:{impersonationLevel=impersonate}!root\wmi").ExecQuery _
("SELECT CurrentTemperature FROM MSAcpi_ThermalZoneTemperature")
for each U in PFU
r = r&U.CurrentTemperature
Next
' r is tenth of kelvin, convert to 蚓.
ACPI_CPUTemp = (r - 2732) / 10
set PFU=Nothing
End Function
原來 Windows 本身也有提供介面讀取 ACPI 的資料。似乎只要把以上的
VBScript 轉成 BCB 就行了...
相關資料:
Windows System Information
http://msdn.microsoft.com/library/en-us/dnanchor/html/winsysinfo.asp
DOC: WMI: Win32_TemperatureProbe.CurrentReading Is Not Populated
http://support.microsoft.com/?id=306852
SMBIOS specifications
http://www.dmtf.org/download/standards/DSP0119.pdf
Windows Instrumentation:WMI 與 ACPI
http://www.microsoft.com/taiwan/whdc/system/pnppwr/wmi/wmi-acpi.mspx
The ACPI Specification
http://www.acpi.info/
Windows Management Instrumentation (WMI)
http://msdn.microsoft.com/library/en-us/dnanchor/html/anch_wmi.asp
WMI C++ Application Examples
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/wmi_c___application_examples.asp