> Yes, it was a DmQueryRecord. This was to determine the current (internal)
> size to see if the DmResizeRecord was required. I'll take the
> DmReleaseRecord out ... but don't I still need somehow to set the dirty
bit?

The general idea is that you set the busy bit before making changes. The
busy bit is a mechanism that prevents multiple writes to the same record.
You don't really have to use this mechanism today, but it is encouraged. You
can write to a record without marking it busy first, but you shouldn't. One
day we might even disallow it. :)

In your case, it sounds like you're only changing the record if you decide
you need to resize it, after reading the contents of the record. You should
use DmGetRecord (even though you already have a handle for the record)
before you make any changes. Then you can use DmReleaseRecord to mark the
record dirty (and clear the busy bit). Another alternative would be to use
DmSetRecordInfo to set the dirty bit manually, but that's more work, and it
doesn't provide you with the protection you'd get if you used the busy bit.
Note that you can't use DmSetRecordInfo to set or clear the busy bit.
--
Danny Epstein
OS Engineer, Palm Inc.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to