var inStream,outStream:TMemoryStream; begin inStream:=TMemoryStream.Create; outStream:=TMemoryStream.Create; try inStream.WriteComponent(self); inStream.Position:=0; ObjectBinaryToText(inStream,outStream); outStream.Position:=0; outStream.SaveToFile(‘c.txt‘); finally FreeAndNil(inStream); FreeAndNil(outStream); end; //WriteComponentResFile(‘c.res‘,self); end;
读取,反过来就是了,不多说。
原文地址:https://www.cnblogs.com/jijm123/p/10992015.html
时间: 2024-11-17 04:20:34