Subject Re: [firebird-support] Re: UDF and Linux, Need help....
Author Ivan Prenosil
1) Do not return pascal long string, but allocate memory yourself:

Result := ib_util_malloc(26);

2) Fill that memory with result using some suitable function, like

StrLCopy(Result, formatertNR, 25);

3) Tell Firebird to free that memory:

> DECLARE EXTERNAL FUNCTION KIDFROMINT
> INTEGER,
> RETURNS CSTRING(25) FREE_IT
^^^^^^^
> ENTRY_POINT 'kidfromint' MODULE_NAME 'flexisoftudf'

Ivan