cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ahmetmahmet
Adept I

ADL_Overdrive5_Temperature_Get Returns -100

I'm using ADL_Overdrive5_Temperature_Get to get temperature of GPU. But it doesn't work correctly. It should return 0 but it returns -100. The interesting side of this is return value doesn't exist in defined error codes. What is the problem? Thanks. (Sorry for my bad English.)

0 Likes
9 Replies
ahmetmahmet
Adept I

Re: ADL_Overdrive5_Temperature_Get Returns -100

My graphics card ATI Mobility Radeon HD 4650.

kcarney
Staff
Staff

Re: ADL_Overdrive5_Temperature_Get Returns -100

Hello!

Can you please post the code that you are using to get -100?

Cheers!

Kristen

ahmetmahmet
Adept I

Re: ADL_Overdrive5_Temperature_Get Returns -100

#include <Windows.h>

#include "adl_sdk.h"

#include <iostream>

using std::cout;

using std::cerr;

using std::cin;

typedef int (* ADL_MAIN_CONTROL_CREATE)(ADL_MAIN_MALLOC_CALLBACK, int);                              // ADL_Main_Control_Create

typedef int (* ADL_MAIN_CONTROL_DESTROY)();                                                                                                    // ADL_Main_Control_Destroy

typedef int (* ADL_ADAPTER_NUMBEROFADAPTERS_GET)(int *);                                                            // ADL_Adapter_NumberOfAdapters_Get

typedef int (* ADL_ADAPTER_ADAPTERINFO_GET)(LPAdapterInfo, int);                                        // ADL_Adapter_AdapterInfo_Get

typedef int (* ADL_OVERDRIVE5_TEMPERATURE_GET)(int, int, ADLTemperature *);                    // ADL_Overdrive5_Temperature_Get

typedef int (* ADL_ADAPTER_ID_GET)(int, int *);                                                                                          // ADL_Adapter_ID_Get

void *__stdcall ADL_Main_Memory_Alloc(int iSize)          // ADL için bellek ayırma işlevi.

{

    void *lpBuffer = malloc(iSize);

    return lpBuffer;

}

int main(int argc, char *argv[])

{

          HMODULE hModule = NULL;                                                                                                                                            // DLL

          ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create = NULL;                                                            // Denetimleri oluşturan işlev.

          ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy = NULL;                                                  // Denetimleri yıkan işlev.

          ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get = NULL;          // Bağlayıcı sayısını alan işlev.

          int iAdapterNumber = 0;                                                                                                                                            // Bağlayıcı sayısını tutan değişken.

          ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get = NULL;                                        // Bağlayıcı bilgilerini alan işlev.

          AdapterInfo *paiInfo = NULL;                                                                                                                        // Bağlayıcı bilgilerini tutan dizi.

          ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get = NULL;                    // Sıcaklığı alan işlev.

          ADLTemperature temperature = { 0 };                                                                                                              // Sıcaklığı tutan yapı.

          ADL_ADAPTER_ID_GET ADL_Adapter_ID_Get = NULL;

          int iAdapterIndex = 0;

          setlocale(LC_ALL, "Turkish");                                                                                                                        // Konsol dilini Türkçe yap.

          if (!(hModule = LoadLibraryA("atiadlxx.dll")))                                                                                // DLL'yi yükle.

          {

                    cerr << "atiadlxx.dll yüklenemedi!\n";

                    cin.get();

                    return 1;

          }

          ADL_Main_Control_Create = (ADL_MAIN_CONTROL_CREATE)

                                                                        GetProcAddress(hModule,

                                                                                                               "ADL_Main_Control_Create");                    // DLL'den işlev adresini al.

          if (!ADL_Main_Control_Create)

          {

                    cerr << "İşlev adresi alınamadı!\n";

                    cin.get();

                    return 1;

          }

          if (ADL_Main_Control_Create(ADL_Main_Memory_Alloc, 1) != ADL_OK)                              // Denetimleri oluştur.

          {

                    cerr << "Ana kontrol oluşturulamadı!\n";

                    cin.get();

                    return 1;

          }

          ADL_Main_Control_Destroy = (ADL_MAIN_CONTROL_DESTROY)

                                                                         GetProcAddress(hModule,

                                                                                                                "ADL_Main_Control_Destroy");                    // DLL'den işlev adresini al.

          if (ADL_Main_Control_Destroy)

          {

                    atexit((void (__cdecl *)()) ADL_Main_Control_Destroy);

          }

          ADL_Adapter_NumberOfAdapters_Get = (ADL_ADAPTER_NUMBEROFADAPTERS_GET)

                                                                                             GetProcAddress(hModule,

                                                                                                                                    "ADL_Adapter_NumberOfAdapters_Get");

          if (!ADL_Adapter_NumberOfAdapters_Get)

          {

                    cerr << "İşlev adresi alınamadı!\n";

                    cin.get();

                    return 1;

          }

 

          if (ADL_Adapter_NumberOfAdapters_Get(&iAdapterNumber) != ADL_OK)

          {

                    cerr << "Bağlayıcı sayısı alınamadı!\n";

 

                    cin.get();

                    return 1;

          }

          ADL_Adapter_AdapterInfo_Get = (ADL_ADAPTER_ADAPTERINFO_GET)

                                                                                  GetProcAddress(hModule,

                                                                                                                         "ADL_Adapter_AdapterInfo_Get");

          if (!ADL_Adapter_AdapterInfo_Get)

          {

                    cerr << "İşlev adresi alınamadı!\n";

                    cin.get();

                    return 1;

          }

 

          paiInfo = new AdapterInfo[iAdapterNumber];

          memset(paiInfo, 0, sizeof(AdapterInfo) * iAdapterNumber);

          if (ADL_Adapter_AdapterInfo_Get(paiInfo, sizeof(AdapterInfo) * iAdapterNumber) != ADL_OK)

          {

                    cerr << "Bağlayıcı bilgileri alınamadı!\n";

 

                    cin.get();

                    return 1;

          }

          ADL_Overdrive5_Temperature_Get = (ADL_OVERDRIVE5_TEMPERATURE_GET)

                                                                                           GetProcAddress(hModule,

                                                                                                                                  "ADL_Overdrive5_Temperature_Get");

          if (!ADL_Overdrive5_Temperature_Get)

          {

                    cerr << "İşlev adresi alınamadı!\n";

                    cin.get();

                    return 1;

          }

          ADL_Adapter_ID_Get = (ADL_ADAPTER_ID_GET)

                                                             GetProcAddress(hModule,

                                                                                                    "ADL_Adapter_ID_Get");

          if (!ADL_Adapter_ID_Get)

          {

                    cerr << "İşlev adresi alınamadı!\n";

                    cin.get();

                    return 1;

          }

          temperature.iSize = sizeof(ADLTemperature);

          for (int i = 0; i < iAdapterNumber; ++i)

          {

                    cout << ADL_Overdrive5_Temperature_Get(paiInfo.iAdapterIndex, 0, &temperature) << "\n";

                    cout << temperature.iTemperature << "\n";

          }

          cin.get();

          delete[] paiInfo;

}

0 Likes
Byron
Staff
Staff

Re: ADL_Overdrive5_Temperature_Get Returns -100

Please post the screen shot of CCC->Informaiton->hardware

Would like to find out the VBIOS information details

thank you

0 Likes
ahmetmahmet
Adept I

Re: ADL_Overdrive5_Temperature_Get Returns -100

2012-04-23_195122.png

0 Likes
ahmetmahmet
Adept I

Re: ADL_Overdrive5_Temperature_Get Returns -100

Any answers?

0 Likes
ahmetmahmet
Adept I

Re: ADL_Overdrive5_Temperature_Get Returns -100

Any answers?

0 Likes
kcarney
Staff
Staff

Re: ADL_Overdrive5_Temperature_Get Returns -100

Sorry about the delay. I'll check on this today!

This team is underwater right now. This issue is on their radar, and they'll get to it a soon as they can.

Sorry I can't provide a better reply!

Kristen

0 Likes
hotter
Journeyman III

Re: ADL_Overdrive5_Temperature_Get Returns -100

I have the same error on my ATI Mobility Radeon 4670. Any news?

0 Likes