Subject | Re: [IBDI] Help about UDF |
---|---|
Author | Paul Reeves |
Post date | 2001-01-06T16:17:48Z |
Why aren't you using CDECL?
Try that instead of STDCALL and let us know if the problem persists.
Paul
ibrahim@... wrote:
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
Try that instead of STDCALL and let us know if the problem persists.
Paul
ibrahim@... wrote:
>--
> Hi all,
>
> I'm trying to make some UDF using Free pascal compiler under linux
> and I'm having some problems.
> Can anyone help me?
>
> Thanks
>
> My code is the following
>
> library udf_cf;
> {$mode objfpc}
>
> uses sysutils;
>
> {$PACKRECORDS C}
> const
> errNessunErrore : Integer = 0;
> errProva : Integer = 20;
>
> function VerificaFormaleCF(pCF : pchar; ErroreDiRitorno : integer)
> : integer;stdcall;
> begin
> Result := 10; //This gives a "segmentation fault" error and IB dies
> Result := ErroreDiRitorno; //This works
> end;
>
> exports
> VerificaFormaleCF name 'VerificaFormaleCF';
> end.
>
Paul Reeves
http://www.ibphoenix.com
taking InterBase further