Subject UDF with string parameter in Terminal Server
Author Gustavo
Hello:

I have a problem using an UDF with a string parameter in Terminal Server.

I wrote a simple UDF in Delphi. The code is the following:

function MMPruebaString(CualAlias: PChar): PChar;
begin
Result:=CualAlias;
end;

Then I compiled it making MMudf.dll, I copied it in the server, in "C:\Archivos de programa\Firebird\Firebird_2_0\UDF". Then I created a DataBase and I declared the UDF with the following command:

DECLARE EXTERNAL FUNCTION MMPruebaString
CSTRING(1000)
RETURNS CSTRING(1000) FREE_IT
ENTRY_POINT 'MMPruebaString'
MODULE_NAME 'MMudf';


Then I connect to the database using IB_SQL IN THE SERVER, I execute SELECT MMPruebaString('pepe') FROM RDB$DATABASE and it returns 'pepe'. Good!

Then I connect to the database using IB_SQL IN A CLIENT PC ON THE LOCAL NETWORK, I execute SELECT MMPruebaString('pepe') FROM RDB$DATABASE and it returns 'pepe'. Good!

Then I connect to the database using IB_SQL CONNECTING VIA TERMINAL SERVER TO THE SERVER (using LOCALHOST:), I execute SELECT MMPruebaString('pepe') FROM RDB$DATABASE and it returns an empty string. THAT´S NOT GOOD!!!

What may be the problem?

Thanks in advance

Gustavo.

[Non-text portions of this message have been removed]