F formality Unregistered / Unconfirmed GUEST, unregistred user! 2006-06-13 #5 var f:TMemoryStream; fs:TFileStream; Buff : Byte; begin Buff := $12; f := TMemoryStream.Create; f.WriteBuffer(Buff,Sizeof(Buff)); fs:=TFileStream.Create('D:/123.dat',fmCreate); fs.Write(f,f.Size); fs.Free; f.Free; end;
var f:TMemoryStream; fs:TFileStream; Buff : Byte; begin Buff := $12; f := TMemoryStream.Create; f.WriteBuffer(Buff,Sizeof(Buff)); fs:=TFileStream.Create('D:/123.dat',fmCreate); fs.Write(f,f.Size); fs.Free; f.Free; end;
H happygb Unregistered / Unconfirmed GUEST, unregistred user! 2006-06-13 #6 to formality: f.WriteBuffer(Buff,Sizeof(Buff));这句的作用是什么? 我的怎么Write,怎么写不进文件啊,大小总是0
H happygb Unregistered / Unconfirmed GUEST, unregistred user! 2006-06-13 #7 我试过了用fs.copyfrom(f,f.Size)是可以的。谢谢大家,现在散分
H happygb Unregistered / Unconfirmed GUEST, unregistred user! 2006-06-13 #8 我试过了用fs.copyfrom(f,f.Size)是可以的。谢谢大家,现在散分