Subject Re: [firebird-support] FB UDF experience
Author masotti
Dimitry Sibiryakov ha scritto:
>> In the most cases the problem were that I passed string (PChar) parameteres to the dll and therefore the ShareMem must be the first entry in the library's Uses clause. But the ShareMem.pas is the interface unit to the borlandmm.dll located in the Delphi/Bin folder. So, the borlandmm.dll must be deployed with the mentioned UDF libs. This method solved all my problems about UDFs on any Windows OS. No more deployment problems!! :-)
>>
>
> Unfortunately, Firebird is not written in Delphi, so ShareMem is
> completely useless in UDF.
>
>
Was a lot of time ago, but if IIRC Delphi 7 wide strings need
borlandmm.dll because of their reference counting. If in your UDF you
use strings or implicit conversion between PChar to string and viceversa
you need ShareMem or FastMem.
If in Delphi code you use only PChar and standard functions not using
strings or TObject, there is no need of borland's memory allocation systems.

Ciao.
Mimmo.