Delphi TMemoryStream写入到字符串和字符串写入到流
2021-02-15 03:19
标签:play alt aac div stream blog delphi phi code 一、TMemoryStream数据写入到字符串里 二、字符串写入到TMemoryStream Delphi TMemoryStream写入到字符串和字符串写入到流 标签:play alt aac div stream blog delphi phi code 原文地址:https://www.cnblogs.com/stroll/p/8442079.htmlvar
lvStream:TMemoryStream;
s:AnsiString;
p: PAnsiChar;
begin
lvStream:= TMemoryStream( pvObject);
GetMem(p, lvStream.Size + 1);
FillChar(p^, lvStream.Size, 0);
Move(lvStream.Memory^,p^,lvStream.Size);
s:=p;
FreeMem(p);
var
lvStream:TMemoryStream;
s:AnsiString;
begin
s:=‘abcdefghjkimoop‘;
lvStream.Write(s[1], Length(s));
lvStream.Position := 0;
end;
文章标题:Delphi TMemoryStream写入到字符串和字符串写入到流
文章链接:http://soscw.com/index.php/essay/55475.html