Hello everyone,
If I have an app info block that I'd like to resize frequently, could this
cause my saved local id to become invalid?
when I create my app info I do the following:
// create the app info block.
if (DmOpenDatabaseInfo(myDb, &dbID, NULL, NULL, &cardno, NULL))
{
DmCloseDatabase(myDb);
return dmErrInvalidParam;
}
hndl = DmNewHandle(myDb, sizeof(MyAppInfoType));
if (!hndl) {
DmCloseDatabase(myDb);
return dmErrMemError;
}
appInfoID = MemHandleToLocalID(hndl);
DmSetDatabaseInfo(cardno, dbID, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, &appInfoID, NULL, NULL, NULL);
// so I just told the database where my app info was located by giving it a
local id.
Later on, I need more app info space so I get the handle again, and resize
it. Now from what I understand, this could cause the memory chunk to move
if a big enough chunk was not available. This would screw up any pointers,
but not hadles. My question is, what about local Ids? Aren't these offsets
from the memory card base address? If the chunk was moved, would't it have
a different offset on the memory card?
Thank you very much.
Steve
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/