Subject | Re: UDF to provide Hexadecimal string |
---|---|
Author | Adam |
Post date | 2005-08-03T23:28:32Z |
--- In firebird-support@yahoogroups.com, "Steve Harp" <steve@h...>
wrote:
In the main project file (the one with library as the first word),
you need to have the following beneath
"{$R *.res}"
exports
IntToHex;
begin
end.
If it isn't listed as exports, it wont be a valid entry point and you
wont be able to use it.
Adam
wrote:
> --- In firebird-support@yahoogroups.com, "Ricardo Uzcategui"this body:
> <ricardouven@c...> wrote:
> > it's easy. in delphi, you can make a udf with a function with
> >Steve,
> > interface
> >
> > function IntToHex( var nNumber: integer ): pchar; cdecl; export;
> >
> >
> >
> > implementation
> >
> > function IntToHex( var nNumber: integer ): pchar;
> > begin
> > result := format('%1.2x',[nNumber])
> > end;
> >
>
> I created a Delphi DLL using your suggestion and placed it in the
> Firebird UDF folder. I then declared it in me schema as so.
>
> declare external function IntToHex
> integer
> returns
> cstring(254)
> entry_point 'IntToHex' module_name 'XpressUDF.dll';
>
> and get the following error.
>
> ISC ERROR MESSAGE:
> invalid request BLR at offset 116
> function INTTOHEX is not defined
> module name or entrypoint could not be found
>
> Any suggestions?
> Steve
In the main project file (the one with library as the first word),
you need to have the following beneath
"{$R *.res}"
exports
IntToHex;
begin
end.
If it isn't listed as exports, it wont be a valid entry point and you
wont be able to use it.
Adam