if you can make your record structures derive from TComponent and define your record data as properties you could read/write to a TStream. I don't think you would need to write your own storage/retrieval code except for data in your structure of custom type.
This is the code Delphi uses to save persistent design-time objects as resources in DFM files. -ns ----- Original Message ----- From: "Donovan J. Edye" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, October 03, 2001 5:37 AM Subject: [DUG]: [Q] Persistent storage of record types.... > G'Day, > > I have a number record structures that I want to save the contents of > persistently and then retrieve them again. > > Eg. > > type TMyRec = record > Name : TPersonName; > Age : integer; > end; > > Assuming I have: > > var > MyRec : TMyRec; > > Is there an easy (perhaps using RTTI) that I could save the contents of > MyRec to something and then be able to read it back later to fill MyRec > again? Or would I have to write my own storage and retrieval operations? > > TIA > > > -- Donovan > ---------------------------------------------------------------------- > Donovan J. Edye [www.edye.wattle.id.au] > Namadgi Systems [www.namsys.com.au] > Voice: +61 2 6285-3460 > Fax: +61 2 6285-3459 > TVisualBasic = Class(None); > Heard just before the 'Big Bang': "...Uh Oh...." > ---------------------------------------------------------------------- > GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer > replacement. Also includes freeware delphi windows explorer components. > ---------------------------------------------------------------------- > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/