At 03:05 PM 5/23/2004, you wrote:
Hey Palm gurus:

Is there a fairly trivial way to simply duplicate a resource database on your Palm, directly as in code/APIs? I just need (essentially) a backup copy with a new name (but still stored in RAM along with the original).

I don't see any obvious way to do this without knowing specifically what kind of resources are in it and stepping through in some kooky iterative way that seems like it might end up a lot of code. But I'd think there is probably some quick small loop way to get it done with an existing API (or APIs)....only I'm probably missing the right combo or the right function call.

1) Create the new database.
2) Iterate through the resources in the first database using DmResourceInfo and DmGetResourceIndex.
3) Create identical record in new DB, then copy contents using DmWrite.



-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/



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

Reply via email to