On Mon, May 08, 2000 at 05:52:41AM -0400, Sean L. Gilley wrote:
>
> I'm writing a PDB file reader and converter. In my Palm program,
> I have a simple structure defined, just:
>
> struct {
> name[21];
> } MyStruct;
>
> and when I write to the Palm database, I always use something on the
> order of:
>
> DmWrite(acc_H, 0, &acc, sizeof(MyStruct));
>
> However, I've found that when I read the PDB file, instead of each
> record being 21 bytes long, each record is only 12 bytes long.
> It is true that the longest value is 11 bytes long, but does this
> mean that the record length changes based upon the size of the
> values in the record, and *not* based upon how many bytes I write
> to the record while on the Palm?
In the DmNewRecord, or DmResizeRecord you set or change the size of
the record. It has nothing to do with the length value in DmWrite
(except it should give some error if you overrun the record - did you
check the return value?).
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/