Use of dynamic linked DLL

Betz

Member²
Dear all,
I have a problem with dinamic linked DLLs where a Oraclequery component is used in the DLL.
The session component is on the main form, so the function call into the DLL must include the session component as a parameter.
(Here is the function description in the DLL:
function refdes(P_session:TOraclesession;Owner,Produktnr:Shortstring):integer; stdcall;
When I try to call these function, I get a error "Access violation in ntdll.dll".
When I static connect the DLL, the function works fine.
Can you tell me what can be the error or do you have a sample with an dynamic linked DLL where the session component is not inside the DLL.

Best regards

Uli
 
When passing a TOracleSession instance you must properly include the ShareMem, as documented by Borland's DLL Wizard. Did you do this?

To avoid ShareMem, you can pass the ExternalSVC of the Host session to the DLL session. See also the "Dynamic Link Libraries" topic in the Direct Oracle Access User's Guide or Help File.
 
Back
Top