I have a handle to a resource which is just a blob of binary data. It was opened like this:
MemHandle hData = DmGetResource('data', id);
I want to increase its size by a few bytes.
If I try this:
DmResizeResource(hData, oldSize + 4);
it fails with error code 0x0206 dmErrReadOnly.
I already unlocked the handle so I assume this is because DmGetResource opened the database in read-only mode. Is that correct?
What is the easiest way to increase the size of this resource? If I need to open the resource as writable, how can I do that? A pointer to a tutorial would be appreciated, since the docs seem to consider this a bit off the beaten path.
You need to open the database that contains the resource in read/write mode. By default, your program database is only open in read-only mode, so use a DmOpenDatabase call to reopen it for writing.
-- Ben Combee, DTS technical lead, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
