i have this problem, doing:
function GenGuid: String;
var
guid: TGuid;
begin
CreateGuid(Guid);
Result := GuidToString(Guid);
end;
It return a guid in string format. But i how do to convert a widestring to unicodestring? I need to have the guid in unicode string format. Thanks very much.
UPDATE
function myguid: string;
var
i: Integer;
s: string;
Guid: TGuid;
t: byte;
begin
CreateGuid(Guid);
s := GuidToString(Guid);
for i := 1 to Length(s) do
begin
t := Ord(MidStr(s, i, 1));
writeln (t);
end;
Result := .... // for now not need, just a test
end;
Doing so, t return 148-124 always and not ascii of single character. If i not do ord( ) then display char correctly.