cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

markus111
Journeyman III

Get Temperature of ATI Mobility X1350 with ati2edxx.dll

Hi,

First, this is  my first post, hello!

 

So, I'm trying to get the Temperature of my X1350 with ati2edx.dll, my Sourcecode:

 

// main.cpp
//

#include <stdio.h>
#include <windows.h>

#define GetTemperatureFunctionName "AtiEDUGetThermalRemoteTemperatureOffset"

typedef UINT (CALLBACK* LPFNDLLTERMO)(UINT, UINT, UINT);

int main(int argc, char** argv)
{
    HINSTANCE hDll;               // Handle to DLL
    LPFNDLLTERMO lpfnDllTermo;    // Function pointer
    UINT uReturnVal;

    printf("Loading Dll..\n");
    hDll = LoadLibrary(TEXT("ati2edxx.dll"));
    if (hDll != NULL)
    {
        printf("Dll loaded!\n");

        printf("Loading Function (%s)...\n", GetTemperatureFunctionName);
        lpfnDllTermo = (LPFNDLLTERMO)GetProcAddress(hDll, GetTemperatureFunctionName);

        if (!lpfnDllTermo)
        {
            printf("Error Loading Function!\n");
            FreeLibrary(hDll);
        }
        else
        {
            printf("Function loaded, calling...\n");
            UINT a = 0;
            UINT b = 0;
            UINT c = 0;
            uReturnVal = lpfnDllTermo(a, b, c);
            printf("Returned Value: %d", uReturnVal);
        }
    }
    else
    {
        printf("Error loading Dll!\n");
    }

    getchar();
}

 

It always outputs 5, what am i dooing wrong?

 

markus111

0 Likes
2 Replies
pisla
Journeyman III

1.

#define GetTemperatureFunctionName "AtiEDUGetThermalRemoteTemperature"

 

2. typedef UINT (CALLBACK* LPFNDLLTERMO)(UINT, UINT, UINT*);

3. uReturnVal = lpfnDllTermo(a, b, &c);
            printf("Returned Value: %u", c);

0 Likes

hi..

i am quite new here........

0 Likes