pOciSvcCtx
Posted: Tue 16 Aug 2011 09:06
Calling dll from exe with sending TOraSession.Con.OciSvcCtx is not worked (oci_invalid_handle). Error occured in SetSvcCtx procedure. What can i do ?
host application : complied some years ago with ODAC 4.10
dll : complied with ODAC 6.9
host application :
Code: Select all
procedure p( Handle:pointer ); cdecl;
dll :
Code: Select all
procedure p( Handle:pointer ); cdecl;
begin
OraSess := TOraSess.Create(application);
// .... Setting direct, net, user, server, loginprompt, ...
OraSess.ChangeConnect( handle );
end;
Code: Select all
TOraSess = class(TOraSession)
public
constructor Create(Owner: TComponent);
destructor Destroy;
procedure ChangeConnect(Handle : Pointer);
end;
implementation
uses ...;
procedure TOraSess.ChangeConnect(Handle : Pointer);
begin
Disconnect;
if (FIConnection = nil) then CreateIConnection;
// if not OCIInited then
InitNet;
FIConnection.Disconnect;
// FIConnection.SetOCICallStyle(OCI80);
FIConnection.SetSvcCtx( Handle ); // Here Error oci_invalid_handle
end;