I'm looking through the Formats sample code to try to figure out the way 
preference panels work.

It includes a sequence where the name resource is loaded, locked, the 
pointer is passed to CtlSetLabel, and the resource is immediately 
unlocked (but never released).

>From what I read in the documentation, calling CtlSetLabel like this is 
suicide. Unlocking the handle makes the pointer no longer valid. Except 
that Formats is usually in ROM, so it can't be unlocked, which means the 
MemHandleUnlock call is just a waste when Formats is in ROM and invalid 
in RAM. I guess DmReleaseResource() does nothing to ROM resources, 
too...?

If I've interpreted this right:
- I need to be keep the handle locked.
- At some point after I unlock, I need to call DmReleaseResource().

Is my analysis correct?

-- 
Steven Fisher; [EMAIL PROTECTED]
"Morituri Nolumus Mori."

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

Reply via email to