Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Do Mär 28, 2024 11:45

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 3 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Fr Mär 21, 2014 06:19 
Offline
DGL Member

Registriert: Mo Jul 08, 2013 05:28
Beiträge: 14
Programmiersprache: Delphi
There are the usual apps like MSI Afterburner to show a nice graph of your GPU temp and fan speeds.

Does anyone have any Delphi code to do this? I would like to have a similar graph in my app without having to run Afterburner as well.

Any clues/code?


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Fr Mär 21, 2014 06:24 
Offline
DGL Member

Registriert: Mo Jul 08, 2013 05:28
Beiträge: 14
Programmiersprache: Delphi
For NVidia there is using the NvCplGetThermalSettings call in the NVCPL.DLL
http://developer.download.nvidia.com/SD ... el_API.pdf
Does anyone have experience calling a DLL like that from Delphi?

I am more interested in NVidia anyway as they have the best compiler and support for shaders from my tests so far.


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Mo Mär 24, 2014 23:40 
Offline
DGL Member

Registriert: Mo Jul 08, 2013 05:28
Beiträge: 14
Programmiersprache: Delphi
OK, an update.

This code apparently works, but failed for me as I have a 32 bit compiled delphi app running under 64 bit Windows 8 so the dll LoadLibrary call fails with system error 193.

Code:
  1. function GetNVDIATemp: integer;
  2. type
  3.   NvCplGetThermalSettings = function(WindowsMonitorNumber: UINT;pGpuTemp, pUmgebTemp, pSlowDownTemp: Pointer): BOOL;stdcall;
  4. var
  5.   hInstNvcpl: THandle;
  6.   GetThermalSettings: NvCplGetThermalSettings;
  7.   UmgebTemp, SlowDownTemp: cardinal;
  8. begin
  9. Result := 0;
  10. UmgebTemp := 0;
  11. SlowDownTemp := 0;
  12. hInstNvcpl := LoadLibrary('nvcpl.dll');
  13. if hInstNvcpl <> 0 then
  14.    try
  15.      GetThermalSettings:= GetProcAddress(hInstNvcpl,'NvCplGetThermalSettings');
  16.      if Assigned(GetThermalSettings)  then
  17.         GetThermalSettings(0, Addr(Result), Addr(UmgebTemp), Addr(SlowDownTemp));
  18.     finally
  19.         FreeLibrary(hInstNvcpl);
  20.     end;
  21. end;

For calling a 64 bit dll from 32 bit dll there is apparently this code that may help
http://cc.embarcadero.com/Item/27667

For now I give up.

Hopefully the above may help someone else who has the same issue.


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 3 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 12 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.049s | 17 Queries | GZIP : On ]