AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Gigabyte dll functions

Ein Thema von Razor · begonnen am 11. Aug 2007 · letzter Beitrag vom 29. Aug 2007
Antwort Antwort
Seite 3 von 4     123 4   
Olli
(Gast)

n/a Beiträge
 
#21

Re: Gigabyte dll functions

  Alt 23. Aug 2007, 03:26
Maybe start up a disassembler and investigate on your own? How about IDA 4.3 Freeware?
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#22

Re: Gigabyte dll functions

  Alt 23. Aug 2007, 18:25
Well i wouldnt know even where to start,all i found is this but what does this mean?Does it contain any parameters,well i doubt so.

Zitat:
public LX_IsQDIMainBoard
LX_IsQDIMainBoard proc near
or eax, 0FFFFFFFFh ; LX_IsMSIMainBoard
retn
LX_IsQDIMainBoard endp

Can someone translate this?To delphi..

Zitat:
#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
Olli
(Gast)

n/a Beiträge
 
#23

Re: Gigabyte dll functions

  Alt 24. Aug 2007, 00:00
Zitat von Razor:
Well i wouldnt know even where to start,all i found is this but what does this mean?Does it contain any parameters,well i doubt so.

Zitat:
public LX_IsQDIMainBoard
LX_IsQDIMainBoard proc near
or eax, 0FFFFFFFFh ; LX_IsMSIMainBoard
retn
LX_IsQDIMainBoard endp
No parameters. It just returns 0xFFFFFFFF, which is another way of saying -1 (32bit) or setting all bits in a LongBool to 1.


Zitat von Razor:
Can someone translate this?To delphi..
The important part is

Code:
typedef int (*isgigabytemobo)(void);
which says that:

type TFNisgigabytemobo = function(): Integer; cdecl; (where cdecl is not important, because no params are being passed)
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#24

Re: Gigabyte dll functions

  Alt 24. Aug 2007, 02:03
Even though if a function doesnt have a parameter can it be called?I guess than it will only return 0 or -1 ,yes or no
  Mit Zitat antworten Zitat
Olli
(Gast)

n/a Beiträge
 
#25

Re: Gigabyte dll functions

  Alt 24. Aug 2007, 02:11
Of course can a function without parameters be called.

Given the short disassembly excerpt, this function returns exactly ONE value: -1

But I presume that the actual meaning is BOOL (i.e. LongBool in Delphi) and that this is supposed to return -1 or 0, yes.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#26

Re: Gigabyte dll functions

  Alt 24. Aug 2007, 02:15
public LX_IsQDIMainBoard
LX_IsQDIMainBoard proc near
or eax, 0FFFFFFFFh ; LX_IsMSIMainBoard
retn
LX_IsQDIMainBoard endp


So this is accuall boolean function that returns -1 or 0 ,you can also sometime see the parameter in the name of the function.Is can only be boolean.
  Mit Zitat antworten Zitat
Olli
(Gast)

n/a Beiträge
 
#27

Re: Gigabyte dll functions

  Alt 24. Aug 2007, 03:04
Zitat von Razor:
So this is accuall boolean function that returns -1 or 0 ,you can also sometime see the parameter in the name of the function.Is can only be boolean.
The point is, that per definition a LongBool (Windows.BOOL) can have any value other than 0 and will be true in that case. This also means that it is not sufficient to check for 1 (as true) and 0 (as false) but rather you should check against 0 (i.e. FALSE) in all cases.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#28

Re: Gigabyte dll functions

  Alt 24. Aug 2007, 13:49
Can you help me with other functions
  Mit Zitat antworten Zitat
Olli
(Gast)

n/a Beiträge
 
#29

Re: Gigabyte dll functions

  Alt 24. Aug 2007, 20:48
How much do you pay per hour?

I can try, but my spare time is limited anyway, so I'd prefer you forward only those parts you really can't solve yourself. Please do it via the forum anyway, so other can benefit from the findings.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#30

Re: Gigabyte dll functions

  Alt 29. Aug 2007, 12:59
For me it returns -1 or false but i dont know for accual users that have gigabyte board.So you may test it


Delphi-Quellcode:
interface

uses
  Fastmm4,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
    const
  w83781ddll = 'w83781d.dll';
type
  TForm1 = class(TForm)
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
    function LX_IsGigaMainBoard : integer;external 'w83781d.dll';
var
  Form1: TForm1;
   hInstdll: THandle;
implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
hInstdll := LoadLibrary(w83781ddll);
if LX_IsGigaMainBoard=-1 then
label1.caption:='you dont have a giga board!'
else if LX_IsGigaMainBoard=0 then
 label1.caption:='you do have a giga board!';
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
FreeLibrary(hInstdll);
end;

end.
Angehängte Dateien
Dateityp: dll w83781d_205.dll (60,0 KB, 20x aufgerufen)
Dateityp: dll markfundrv_767.dll (112,0 KB, 20x aufgerufen)
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:31 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz