Erico,

>//if this line exists....
>pnoJpeg_OpenLibrary(&pnoJpegRefNum);
>.
>MemHandle resH = DmGet1Resource( bitmapRsc, 1000);
>// resH returns NULL here and the err points to a Db rsc do not exist.

DmGet1Resource() only searches the most recently opened resource database.  In a
typical application, that would be the application PRC itself.  Evidently that
jpeg library opens itself in order to find additional resources, and leaves it
open.  That makes it the only db searched when using DmGet1Resource().

Two options would be to either:

 1) Use DmGetResource() instead so it searches all open resource db's

 2) After opening the library, do another explicit open to your own prc so 
        that it becomes the most recently opened db for DmGet1Resource()

If you do option 2, remember to close it during program termintation.

Doug

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

Reply via email to