Re: Help reading structured binary files
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Mon, 18 Jul 2005 12:20:58 -0500
Bruce Roberts wrote:
Type pLoadRec = ^ tLoadRec; tLoadRec = packed record id : ShortInt; data : string [255]; terminator : array [0 .. 1] of byte; end;
The simplest way to load the records with this type would be a file of tLoadRec. A (file) stream would also work and might prove more flexible.
The only part of the entire file that will match the layout of that record is the very end of the file, and then only if the data length for that part of the file is 255 bytes. (The terminator designates the end of the _file_, not the end of a record.)
The structure, as Robert described, is of variable length, but Delphi records aren't.
-- Rob .
- Follow-Ups:
- Re: Help reading structured binary files
- From: Bruce Roberts
- Re: Help reading structured binary files
- References:
- Help reading structured binary files
- From: Robert Kilroy
- Re: Help reading structured binary files
- From: Bruce Roberts
- Help reading structured binary files
- Prev by Date: Re: Rotate bitmap
- Next by Date: Re: Help reading structured binary files
- Previous by thread: Re: Help reading structured binary files
- Next by thread: Re: Help reading structured binary files
- Index(es):