>Can anyone point to any examples of this to help get me started.  I've
>searched using keywords CreateDatabaseFromImage, ExgDBRead and ExgDBWrite
>and I'm not making much headway.

Using the PilRC plugin, you can fold a PDB into a PRC by including a 
".r" in your project that has something like this in it:

read 'CreatorID' (Resource#) "DBName";

Then, in your app start routine, use

DmGetNextDatabaseByTypeCreator

to find the database. If it's not there, do this to unpack it and install it:

MemHandle resH = DmGetResource ( CreatorID, Resource# );
MemPtr resP = MemHandleLock ( resH );
Err error = DmCreateDatabaseFromImage ( resP );
MemHandleUnlock ( resH );

Error handling has been removed to simplify the code. I hope that helps.

Regards,
Steve Mann

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

Reply via email to