delphi xe 二进制流读写
2021-04-30 21:27
标签:pre phi abc 二进制 nbsp char div length array 避免乱入坑 留个记录~ delphi xe 二进制流读写 标签:pre phi abc 二进制 nbsp char div length array 原文地址:http://www.cnblogs.com/pboy/p/7801000.html 1 m_pBin,m_pBink: array[0..19] of byte;
2
3 m_pbinx: PAnsiChar;
4 len: Integer ;
5 mStream: TStream;
6 begin
7 m_pbinx:= ‘1234567890abcdefgopq‘;
8 Move(m_pbinx^, m_pBin, 20);
9 len:= Length(m_pBin);
10 mStream:= TMemoryStream.create;
11 mStream.Position:= 0;
12 mStream.Write(@m_pBin, len);
13 mStream.Position := 0;
14 mStream.Read(m_pBink, 20);
15
16 mStream.Free;