Subject To use TIB_ as parameter DLL, need to use ShareMem or SimpleShareMem in uses clause?
Author hamacker
Hi everybody,

Who knows if is necessary to declare  ShareMem or SimpleShareMem in uses clause when I need to pass IB_Connection by parameter as :

function ModuloRodar(MyConn:TIB_Connection;sParam:WideString): WideString; stdcall;

In:

On Win32 and Win64, if a DLL exports routines that pass long strings or dynamic arrays as parameters or function results (whether directly or nested in records or objects), then the DLL and its client applications (or DLLs) must all share the same memory manager. The same is true if one application or DLL allocates memory with System.New or System.GetMem which is deallocated by a call to System.Dispose or System.FreeMem in another module. There are two mutually exclusive methods through which the Memory Manager can be shared between an application and its libraries: ShareMem and SimpleShareMem.