"Rene' Laterveer" <[EMAIL PROTECTED]> wrote in message
news:14253@palm-dev-forum...
> I'm trying to resize an existing AppInfo block.
>
> I tried to use MemHandleResize() and DmResizeRecord(), but that does not
> seem to work.
How was the app info block created in the first place? If it was created as
a handle, then it can be resized later. If it was created as a pointer, then
you might not be able to grow it. You can always create a new app info
block, free the old one, and make the database point to the new one.
To create a resizable app info block, use DmNewHandle to create the chunk.
You can set up the initial contents by locking it if you want. Then unlock
it and convert it to a local ID using MemHandleToLocalID. Finally, tell the
database to use this local ID as its app info block using DmSetDatabaseInfo.
To resize the app info block, start by using DmDatabaseInfo to get the local
ID for the app info block. Convert it to a hande using MemLocalIDToLockedPtr
followed by MemPtrRecoverHandle. Unlock it and resize it as usual
(MemHandleUnlock and MemHandleResize). Then lock it and mess with the
contents if you want.
I've written code like this, but I don't have it handy. This may not be
quite right...
--
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/