GetCurrentTemp

概述

获取温度。

补充

获取温度:摄氏度。

VC++ .NET VC# .NET VB .NET


VC++ .NET

GetCurrentTemp
调用方法 BOOL GetCurrentTemp(int iSelect, int *iTemp);
返回值
TRUE : 正常
FALSE : 错误
参数 int iSelect
MONITOR_TEMP1 : CPU温度
MONITOR_TEMP2 : 系统温度
MONITOR_TEMP3 : 保留
int *iTemp 温度
示例 int ret, iTemp;
ret = GetCurrentTemp(MONITOR_TEMP_CPU, &iTemp);
必要条件
Header : iocif.h/iocifconst.h
Library : ioctl.lib

页面顶端

VC# .NET

GetCurrentTemp
调用方法 [DllImport("Ioctl.dll")] static extern int GetCurrentTemp(int iSelect, ref int iTemp);
返回值
非0 : 正常
0 : 错误
参数 int iSelect
MONITOR_TEMP1 : CPU温度
MONITOR_TEMP2 : 系统温度
MONITOR_TEMP3 : 保留
ref int iTemp 温度
示例 int ret, iTemp;
ret = GetCurrentTemp(MONITOR_TEMP1, ref iTemp);

页面顶端

VB .NET

GetCurrentTemp
调用方法 Declare Function GetCurrentTemp Lib "Ioctl.dll"(ByVal iSelect As Integer, ByRef iTemp As Integer)As Integer
返回值
非0 : 正常
0 : 错误
参数 ByVal iSelect As Integer
MONITOR_TEMP1 : CPU温度
MONITOR_TEMP2 : 系统温度
MONITOR_TEMP3 : 保留
ByRef iTemp As Integer 温度
示例 Dim ret As Integer
Dim iTemp As Integer
ret = GetCurrentTemp(MONITOR_TEMP_CPU, iTemp)

页面顶端