Subject Re: [firebird-support] Re: UDF and Linux, Need help....
Author Ivan Prenosil
> But, the problem is still there.

Do you mean the problem is still there even after correcting
memory allocation in the way I told you in previous mail ?

> function kidfromint(var V1, prefix,lengde : integer) : PAnsichar; cdecl; export;
> var
> formatertNR : string;
> begin
> formatertNR := trim(inttostr(V1));
> ...
> Result := PAnsichar(formatertNR);
> end;

You are returning address of long string associated with local
variable, that is freed after the function ends, i.e. _before_ Firbird
reads its value.

Ivan