Ah, Missverständnis, etwas in der Art?
Delphi-Quellcode:
Type
TByteArray=Array[0..0] of byte;
Function AsHexString(p:Pointer;cnt:Integer):String;
var
i:Integer;
begin
Result :='';
for I := 0 to cnt do
Result := Result +'$'+IntToHex(TByteArray(p^)[i],2);
end;
procedure TForm3.Button1Click(Sender: TObject);
var
UCS:WIDEString;
begin
UCS := Edit1.Text;
Edit2.Text := AsHexString(@UCS[1],Length(UCS)*2 - 1);
end;