找回密码
 加入
搜索
查看: 2581|回复: 5

[系统综合] 请教DllCall调用nvcpl.dll显卡温度返回0度问题

[复制链接]
发表于 2016-12-18 15:18:05 | 显示全部楼层 |阅读模式
DllCall调用nvcpl.dll显卡温度返回0度问题,请教大侠指点!!
用的是Win10 64位系统

$dll = DllOpen("nvcpl.dll")
$result = DllCall($dll,"int:cdecl", "NvCplGetThermalSettings", "INT",0, "DWORD*", "pdwCoreTemp", "DWORD*", "pdwAmbientTemp", "DWORD*", "pdwUpperLimit")
If @error then msgbox(0,"","ERROR")
MsgBox(4096, "Test", $result[2])
DllClose($dll)

英伟达文档中API函数是这样的.
Function               BOOL CDECL NvCplGetThermalSettings(IN UINT nWindowsMonitorNumber,
Prototype                    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.
发表于 2016-12-18 22:15:59 | 显示全部楼层
 楼主| 发表于 2016-12-18 23:03:50 | 显示全部楼层
$result = DllCall($dll, "int:cdecl", "NvCplGetThermalSettings", "int", 0, "long*", '', "long*", "", "long*", "")
MsgBox(4096, "Test", $result[2])
这样还是返回0

怎么也不行,希望大侠能指点!感激不尽。
 楼主| 发表于 2016-12-18 23:21:08 | 显示全部楼层
回复 2# ceoguang


  非常感谢!!!
不知道能不能AU3直接调NVCPL.DLL文件得到显卡温度!
发表于 2016-12-19 12:22:26 | 显示全部楼层
回复 4# mgj8721
我上面发的那个就可以获取.nvcpl的话总是返回false
 楼主| 发表于 2017-1-10 00:36:39 | 显示全部楼层
回复 5# ceoguang


ceoguang :
帮忙指点,不知道如何转成AU3,非常感谢了!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 15:42 , Processed in 0.074213 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表