|
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. |
|