Subject | Re: [firebird-support] Client installation check |
---|---|
Author | Florian Hector |
Post date | 2005-03-30T21:57:05Z |
>procedure TForm1.ButtonDBTestClick(Sender: TObject);
> i would like to ask you, if there's some api in FDB,
> which checks, if database client (gds32.dll) is installed.
> In InterBase it's something like CheckIBLoaded, i think.
>
> Thank you for your help.
var
dhand:THandle;
procPointer:Pointer;
messString:string;
begin
procPointer := nil;
dhand := LoadLibrary('gds32.dll');
if dhand > 0 then
procPointer := GetProcAddress(dhand,'isc_sql_interprete');
if procPointer <> nil then
messString := 'all went fine, Interbase Client found. Handle:' +
IntToStr(dhand)
else
messString := 'ZONK, Interbase Client NOT found.';
ShowMessage(messString);
if dhand > 0 then
FreeLibrary(dhand);
end;
Florian