From: "Caspar Heiden, vd" <[EMAIL PROTECTED]>
> As I understand it, a database starts with a database header (78 bytes)
> and then, depending on wether or not it is a resource datbase a number
> of 10 byte resource headers or 8 byte record headers and then...
>
> ... in my case two padding zeros before the 'actual resource data'. Is
> it safe to assume that records / resources are always on a 4 byte
> boundary? And is this only true for the 1st record or for all records?
>
In theory you don't iterate the records by counting bytes through
the file, but by using the file offsets in the headers.
For resources that 10 byte header you mention has the structure:
typedef struct {
UInt32 type;
UInt16 id;
LocalID localChunkID;
} RsrcEntryType;
where localChunkID = The local offset from the top of the PRC to
the start of the resource data for this entry.
By using the index you avoid issues to do with how many padding
bytes there are or what boundaries the records are on.
> Also: where can I find the best definition of Palm databases? Google
> gave lots of results, that I could distract a lot of information from,
> but I'd really like some complete, accurate documentation in one
> place...
http://www.palmos.com/dev/support/docs/fileformats/FileFormatsTOC.html
Chris Tutty
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/