Thema: Delphi Gigabyte dll functions

Einzelnen Beitrag anzeigen

Razor
(Gast)

n/a Beiträge
 
#18

Re: Gigabyte dll functions

  Alt 12. Aug 2007, 15:26
LX_IsGigaMainBoard //Checks if its gigabyte board


This functions 100%.Works like this if you have a Gigabyte board then it will show i:0(as boolean true) if you don't have a Gigabyte board then it will show i:-1(as boolean false).Simple,eh?


Delphi-Quellcode:
#include <windows.h>
#include <stdio.h>

typedef int (*isgigabytemobo)(void);

int main()
{
   HMODULE hGigabyteLib = NULL;
   isgigabytemobo LX_IsGigaMainBoard = NULL;

   hGigabyteLib = LoadLibrary(L"W83781D.DLL");

   if (hGigabyteLib != NULL)
   {
      printf("Library loaded: W83781D.DLL.\n");

      LX_IsGigaMainBoard = (isgigabytemobo)GetProcAddress(hGigabyteLib, "LX_IsGigaMainBoard");

      if (LX_IsGigaMainBoard != NULL)
      {
         printf("Found LX_IsGigaMainBoard.\n");

         printf("i: %i.\n", LX_IsGigaMainBoard());
      }
      else
         printf("Could not find LX_IsGigaMainBoard.\n");
      
      FreeLibrary(hGigabyteLib);
   }
   else
      printf("Couldn't load library W83781D.DLL.\n");

   system("pause");

   return 0;
}
  Mit Zitat antworten Zitat