注册 登录
编程论坛 C++教室

如何读取NVCPL.DLL中关于显卡温度函数的参数作息?

hai0303 发布于 2011-10-18 00:05, 1997 次点击
以下代码是调用NVIDIA的NVCPL.DLL中的NvCplGetThermalSettings函数。目的是获取显卡温度。

#include
#include
#include

void main()
{
HINSTANCE hhh;
hhh=LoadLibrary("nvcpl.dll");

typedef int(*TEMP)(int nWindowsMonitorNumber,int pdwCoreTemp,int pdwAmbientTemp, int pdwUpperLimit);

TEMP NS;
NS=(TEMP)GetProcAddress(hhh,"NvCplGetThermalSettings");
if(!NS)
{
std::cout<<("获取函数地址失败\n");
return;
}

}

程序写到这了 编译成功。不知道对不对?
下面不知道怎么读取pdwCoreTemp参数中的温度信息。pdwCoreTemp中应该就是GPU的温度!
望高手指点!!!最好有源码
NVIDIA的NVCPL.DLL中NvCplGetThermalSettings的帮助文件我发在楼下。
4 回复
#2
hai03032011-10-18 00:05
Temperature and Power Monitoring  

  NvCplGetThermalSettings()
Function BOOL CDECL NvCplGetThermalSettings
Prototype (IN UINT nWindowsMonitorNumber,
  OUT DWORD* pdwCoreTemp,
  OUT DWORD* pdwAmbientTemp,
  OUT DWORD* pdwUpperLimit);
Parameters In UINT nWindowsMonitorNumber -- The display number shown on
  the Windows Display Properties->Settings page.  
A value of 0 indicates the current primary Windows display device.
DWORD* must be a valid pointer –
pdwCoreTemp -- GPU temperature in degrees Celsius.
pdwAmbientTemp -- Ambient temperature in degrees Celsius.
pdwUpperLimit -- Upper limit of the GPU temperature specification.
Return Values True on success.  
  False on failure.
#3
lucky5635912011-10-18 08:10
要看nv的说明文档
#4
hai03032011-10-18 18:39
2楼就是NV的说明文档。
代码写了一半,不知道怎么读取参数。
#5
编程的乐趣2011-10-18 18:41
.
1