Re: Memorystream to widestring
- From: "Toon Krijthe" <remove.this.krijthe.and.this.too@xxxxxxxxx>
- Date: Sat, 30 Apr 2005 18:01:57 +0200
function StreamToWideString(AStream: TStream): WideString;
var
r : TReader;
begin
r := TReader.Create(AStream);
result := r.ReadWideString;
r.FRee;
end;
should work
regards
Toon
"Costa" <costakaramalis@xxxxxxxxxxxxxxxxx> wrote in message
news:b68771l5n65btpjfigahrf5kceeg5ktbpt@xxxxxxxxxx
> Hi all,
>
> how can I copy the contents of a memorystream into a widestring?
> I can do it for a string, but widestring doesnt work.
>
> procedure TForm1.Button1Click(Sender: TObject);
> var
> SourceString: widestring;
> MemoryStream: TMemoryStream;
> begin
> .....
> MemoryStream.Position := 0;
> SetLength(SourceString, MemoryStream.Size);
> MemoryStream.ReadBuffer(Pointer(SourceString)^,MemoryStream.Size);
> Caption := SourceString;
> ....
>
> Can someone help me out? I m stuck.
>
> Thank you.
.
- References:
- Memorystream to widestring
- From: Costa
- Memorystream to widestring
- Prev by Date: Memorystream to widestring
- Next by Date: older delphi
- Previous by thread: Memorystream to widestring
- Next by thread: older delphi
- Index(es):