function StreamToStr(Stream: TStream): string;
begin
setLength(result, Stream.Size);
Stream.Position := 0;
Stream.ReadBuffer(result[1], Stream.Size);
end;
procedure StrToStream(var S: string; Stream: TStream);
begin
Stream.Position := 0;
Stream.WriteBuffer(s[1], length(s));
end;
文章標籤
全站熱搜
留言列表