>
>  What is in firebird.log ?

Nothing in the firebird.log

  How UDF is declared in DB ?



DECLARE EXTERNAL FUNCTION SIMPLE
  CSTRING (254)
  RETURNS CSTRING (254) FREE_IT
  ENTRY_POINT 'Simple' MODULE_NAME 'SitaUdfLib.dll'

How UDF is declared in Pascal ?


function Simple(sz: PChar): PChar; cdecl; export;

How memory for return parameter is allocated ?


I use this udfmalloc, on windows is defined as:

function udfmalloc(Size: Integer): Pointer; cdecl; external 'ib_util.dll'
name 'ib_util_malloc';



On Mon, May 6, 2019 at 12:38 PM Vlad Khorsun <[email protected]> wrote:

> 06.05.2019 10:48, Massimo Fazzolari wrote:
> > Hello,
> >
> > I have an UDF lib compiled with FPC 3.0.4 (Lazarus 2.0.2) that works
> properly on linux (Ubuntu 18.04 and Firebird 2.5.8.27089) but
> > Firebird crashes on Windows with this error everytime I invoke any of
> the user defined functions:
> >
> > *Error writing data to connection*
>
>    What is in firebird.log ?
>
> > The same UDF library works properly on Windows and Linux when compiled
> with FPC 2.6.4 (Lazarus 1.2.6)
> >
> > Does anybody have any clue what could cause this issue on Windows?
>
>    How UDF is declared in DB ?
>    How UDF is declared in Pascal ?
>    How memory for return parameter is allocated ?
>
> Regards,
> Vlad
>
> PS there was issues witn wrong exception handler in FPC 2.x on Win64, but
> i believe it was fixed in FPC 3.x
>
>
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to