Subject Re: [firebird-support] problem with UDF in 64 bits Firebird
Author Mark Rotteveel
On Fri, 26 Oct 2012 14:39:27 -0000, "Sergio" <shg_sistemas@...>
wrote:
> Hello! I had a very simple UDF which I used in my 32 bits app, now I've
> changed the PC, and installed FB 64, and the UDF stopped working.
>
> I get this message:
>
> can't format message 13:896 -- message file C:\Windows\firebird.msg not
> found.
> invalid request BLR at offset 59.
> function SG_DES is not defined.
> module name or entrypoint could not be found.
>
> I googled it and I found that I should compile the DLL to 64 bits... I
did
> it. I use Delphi XE2, but the problem continues
>
> This is the declaration of the udf:
>
> DECLARE EXTERNAL FUNCTION SG_DES
> DOUBLE PRECISION,
> CSTRING(50)
> RETURNS DOUBLE PRECISION BY VALUE
> ENTRY_POINT 'Descuentos' MODULE_NAME 'SGUDF';

Where did you store the UDF? And if it is outside the UDF folder of your
firebird installation, did you modify the Firebird.conf to allow this
additional location to be accessed by Firebird

The default in firebird.conf is:
#UdfAccess = Restrict UDF

Which means only the UDF folder in the Firebird installation is allowed.

You need to change this to:
UdfAccess = Restrict UDF;<path-prefix-for-your-UDF>

Notes: remove the '#'

Mark