- Jan 3, 2006
- 1,594
- 1
- 0
I'm aware that VB6 is hardly the best language out there, but I haven't started learning C++ yet (only been doing VB6 for about a year I spose)
Anyway, I want to programmatically get the temp from my nvidia GPU. I've found what I need to use, an API call to the nvcpl.dll. I've found the documentation for using it, but unfortunately, don't know how to use that
I'll put it at the bottom of the post, hopefully someone can show me how to make it into a useable function.
I tried doing it like:
Private Declare Function (Name) Lib "nvcpl.dll" Alias "NVcplgetthermalSettings" and so on, but on calling that, Vb6 just crashed, so I'm fairly sure that I did that wrong. I haven't had to structure a functino declare like that myself before, I've managed to tweak existing ones, and so though I'd give it a go, but any help would be much appreciated.
In the API documentation, there is a VB script that they provided, so I was hoping that I'd be able to call this from VB6.
Thanks for any help.
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.
Anyway, I want to programmatically get the temp from my nvidia GPU. I've found what I need to use, an API call to the nvcpl.dll. I've found the documentation for using it, but unfortunately, don't know how to use that
I'll put it at the bottom of the post, hopefully someone can show me how to make it into a useable function.
I tried doing it like:
Private Declare Function (Name) Lib "nvcpl.dll" Alias "NVcplgetthermalSettings" and so on, but on calling that, Vb6 just crashed, so I'm fairly sure that I did that wrong. I haven't had to structure a functino declare like that myself before, I've managed to tweak existing ones, and so though I'd give it a go, but any help would be much appreciated.
In the API documentation, there is a VB script that they provided, so I was hoping that I'd be able to call this from VB6.
Thanks for any help.
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.
