K kasly Unregistered / Unconfirmed GUEST, unregistred user! 2000-05-29 #1 我现在把一个TMemoryStream分成两段,不知道如何把 它在和并成原来的一段?
C Croco Unregistered / Unconfirmed GUEST, unregistred user! 2000-05-29 #2 var NewStream: TMemoryStream; begin NewStream := TMemoryStream.Create; // 新建一个用于连接 NewStream.ReadBuffer(Mem1^, Mem1.Size); NewStream.ReadBuffer(Mem2^, Mem2.Size); // 应该已经可以了 .... end;
var NewStream: TMemoryStream; begin NewStream := TMemoryStream.Create; // 新建一个用于连接 NewStream.ReadBuffer(Mem1^, Mem1.Size); NewStream.ReadBuffer(Mem2^, Mem2.Size); // 应该已经可以了 .... end;
C Croco Unregistered / Unconfirmed GUEST, unregistred user! 2000-05-29 #4 var P: ^Byte; begin Mem3.SetSize(Mem1.Size + Mem2.Size); P := Mem3.Memory; Mem1.ReadBuffer(P^, Mem1.Size); Inc(P, Mem1.Size); Mem2.ReadBuffer(P^, Mem2.Size); Mem3.SaveToFile('d:/link1.txt'); end;
var P: ^Byte; begin Mem3.SetSize(Mem1.Size + Mem2.Size); P := Mem3.Memory; Mem1.ReadBuffer(P^, Mem1.Size); Inc(P, Mem1.Size); Mem2.ReadBuffer(P^, Mem2.Size); Mem3.SaveToFile('d:/link1.txt'); end;