Exe and Dll Orasession access
Posted: Fri 25 May 2012 08:12
Hi,
Open the connecting in my project.
Using the form in the dll.
How can I orasession to the library project?
Please help!
Exe file project:
Dll Project:
Open the connecting in my project.
Using the form in the dll.
How can I orasession to the library project?
Please help!
Exe file project:
Code: Select all
procedure ShowForm;stdcall;external '../../Project1dll.dll' name 'ShowDllForm';
procedure connectionVer(Oracon:TOraSession);stdcall;external '../../Project1dll.dll' name 'ShowDllForm';
procedure TMainFrm.Button1Click(Sender: TObject);
begin
OraSession1.Connect;
connectionVer(OraSession1);
ShowForm;
Code: Select all
library Project1dll;
uses
SysUtils,
Classes,
Ora,
DllForm in 'DllForm.pas' {frmDllForm};
var
OraVeri:TOraSession;
procedure connectionVer(Oracon:TOraSession);
begin
OraVeri:=Oracon;
end;
procedure ShowDllForm;stdcall;
begin
frmDllForm :=TfrmDllForm.Create(nil);
frmDllForm.OraQuery1.Session:=OraVeri;
frmDllForm.OraQuery1.Open;
frmDllForm.Show;
end;
Exports
ShowDllForm,
connection ;
begin