> From: Karen M. Serafino [mailto:[EMAIL PROTECTED]]
> use DmNewHandle to allocate a chunk of storage memory,
> then MemHandleLock to lock down a pointer to it, then DmWrite
> [...] the problem is that after a soft reset, the contents
> of the character string are not at the same address
That won't work. If you allocate a chunk with DmNewHandle and never attach
it to any database (via DmAttachRecord or DmAttachResource) then the chunk
is considered orphaned after your app exits and will be garbage collected
during the next soft reset. (This is what you are seeing.) So any storage
heap chunks you want to persist must be attached to some db. You should be
able to create a single scratch db, attach all your DmNewHandle'd memory to
it, but keep the rest of the logic and data structures the same.
-slj-
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/