GetCurrentFan

概述

获取风扇速度。

补充

获取风扇速度:转数/分钟(rpm)。

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


VC++ .NET

GetCurrentFan
调用方法 BOOL GetCurrentFan(int iSelect, int *iFan);
返回值
TRUE : 正常
FALSE : 错误
参数 int iSelect
MONITOR_FAN1 : 系统风扇
MONITOR_FAN2 : 保留
MONITOR_FAN3 : 保留
int *iFan 风扇速度
示例 int ret, iFan;
ret = GetCurrentVolt(MONITOR_FAN1, &iFan);
必要条件
Header : iocif.h/iocifconst.h
Library : ioctl.lib

页面顶端

VC# .NET

GetCurrentFan
调用方法 [DllImport("Ioctl.dll")] static extern int GetCurrentFan(int iSelect, ref int iFan);
返回值
非0 : 正常
0 : 错误
参数 int iSelect
MONITOR_FAN1 : 系统风扇
MONITOR_FAN2 : 保留
MONITOR_FAN3 : 保留
ref int iFan 风扇速度
示例 int ret, iFan;
ret = GetCurrentFan(MONITOR_FAN1, ref iFan);

页面顶端

VB .NET

GetCurrentFan
调用方法 Declare Function GetCurrentFan Lib "Ioctl.dll"(ByVal iSelect As Integer, ByRef iFan As Integer)As Integer
返回值
非0 : 正常
0 : 错误
参数 ByVal iSelect As Integer
MONITOR_FAN1 : 系统风扇
MONITOR_FAN2 : 保留
MONITOR_FAN3 : 保留
ByRef iFan As Integer 风扇速度
示例 Dim ret As Integer
Dim iFan As Integer
ret = GetCurrentFan(MONITOR_FAN1, iFan)

页面顶端