IQU - Example using DLL
This example shows how to use the IQU DLL from Borland Delphi.
type
TScriptLineCallback = procedure(aLine: PChar);
TExecuteScript = procedure(aScript: PChar;
aLineCallback: TScriptLineCallback); stdcall;
procedure LineCallback(aLine: PChar);
begin
ShowMessage(aLine);
end;
procedure TestScript;
var
lHandle: THandle;
lExecuteProc: TExecuteScript;
begin
lHandle := Loadlibrary('iqucmd.dll');
lExecuteProc := GetProcaddress(lHandle, 'ExecuteScript');
lExecuteProc(
'CONNECT ''localhost:employee'' USER ''sysdba'' '+
' password ''masterkey'';'+
'SELECT * FROM rdb$database;',
@LineCallback);
FreeLibrary(lHandle);
end;