Subject Re: [firebird-support] Re: UDF with string parameter in Terminal Server
Author Gustavo
Helen was right!

I omitted the cdecl calling convention on the function declaration and that
was the problem.

Thank you very much Helen, and thank you to Adam too!

Gustavo

----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <firebird-support@yahoogroups.com>
Sent: Monday, September 17, 2007 10:24 PM
Subject: Re: [firebird-support] Re: UDF with string parameter in Terminal
Server


>
>>--- In firebird-support@yahoogroups.com, "Gustavo" <gusm@...> wrote:
>> > I wrote a simple UDF in Delphi. The code is the following:
>> >
>> > function MMPruebaString(CualAlias: PChar): PChar;
>> > begin
>> > Result:=CualAlias;
>> > end;
>>
>>Try out something in ib_udf that works with a string. For example.
>>
>>DECLARE EXTERNAL FUNCTION substr .....
>>
>>select substr('Hello World!', 2,5)
>>from RDB$DATABASE;
>>
>
> At 10:56 AM 18/09/2007, you wrote:
>
>>(Yes, this is a deprecated function because you now have substring
>>built into the engine itself, but you can test whether this really is
>>a terminal services issue or something about your custom dll).
>
> ...such as omitting the cdecl calling convention from the function
> declaration?
>
> ./heLen
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
> __________ InformaciĆ³n de NOD32, revisiĆ³n 2535 (20070917) __________
>
> Este mensaje ha sido analizado con NOD32 antivirus system
> http://www.nod32.com
>
>