Subject | UDF & unicode_FSS & delphi widestring ... |
---|---|
Author | mnavahan |
Post date | 2007-12-16T11:16:25Z |
hi
i write own udf in delphi base in Greg Deatz' UDFlib
nice and easy ...
but :
now i need send some unicode string to my function in delphi and return
unicode string to firebird via UDF
for example function below echo text from udf:
1. must use PChar param or PWidechar ?
function F_Unicode_ECHO(const Str: PChar): PChar;cdecl; export;
function F_Unicode_ECHO(const Str: PWideChar): PWideChar;cdecl; export;
2.how convert this udf in delphi to widestring and return it :
function F_StringTo2WHex(const Str: PChar): PChar;
var
res : wideString;
begin
S := widestring(Str);
result := MakeResultString(PChar(s), nil, 0);
end;
sorry up code no work ! can help me ?
i write own udf in delphi base in Greg Deatz' UDFlib
nice and easy ...
but :
now i need send some unicode string to my function in delphi and return
unicode string to firebird via UDF
for example function below echo text from udf:
1. must use PChar param or PWidechar ?
function F_Unicode_ECHO(const Str: PChar): PChar;cdecl; export;
function F_Unicode_ECHO(const Str: PWideChar): PWideChar;cdecl; export;
2.how convert this udf in delphi to widestring and return it :
function F_StringTo2WHex(const Str: PChar): PChar;
var
res : wideString;
begin
S := widestring(Str);
result := MakeResultString(PChar(s), nil, 0);
end;
sorry up code no work ! can help me ?