Registriert seit: 24. Okt 2004
1.542 Beiträge
Delphi XE Architect
|
Re: Gigabyte dll functions
11. Aug 2007, 09:12
try it so
Delphi-Quellcode:
function ismotherboard: boolean;
type
LX_IsGigaMainBoard = function(pIsGigaMainBoard: Pointer): boolean stdcall;
var
hInstDll: THandle;
IsGigaMainBoard: LX_IsGigaMainBoard;
Pfad: AnsiString;
begin
Pfad := ExtractFilePath(application.ExeName) + 'w83781d.dll';
if FileExists(Pfad) then
begin
hInstDll := LoadLibrary(PChar(Pfad));
if hInstDll <> 0 then
try
IsGigaMainBoard:= GetProcAddress(hInstDll, 'LX_IsGigaMainBoard');
if Assigned(IsGigaMainBoard) then
begin
IsGigaMainBoard(Addr(Result));
end
else ShowMessage('Error');
finally
FreeLibrary(hInstDll);
end;
end;
maybe der is an error while loding the dll
and do you know that this type deklaration is correct?
LX_IsGigaMainBoard = function(pIsGigaMainBoard: Pointer): boolean stdcall;
Alex "Sage nicht alles, was du weißt, aber wisse alles, was du sagst!" Matthias Claudius
"Wer sich über Kritik ärgert, gibt zu, daß er sie verdient hat." Tacitus
|