> No one knows the answer? Do I need to MemHandleLock the code resource,
> my database or whatever? Doesn't unlock the OS my handle after my app
> quits? Many questions, any answer?

"Protecting" a DB, as far as I know, only marks it as "Do not allow copying to 
another handheld or memory card."  It has nothing, programatically, to do 
with memory allocation or locking.

I've used callback functions like those before, and simply Locking the pointer 
(MemHandleLock) should be sufficient.  However, because the code may be 
called while your app is not running, you must not use globals and you must 
open your Resource DB before using any resources.  (Be sure to close it 
again.)  I also recommend having callback functions like that in a separate 
code resource, thus avoiding over-locking your primary code resource.

-- 
Matthew Bevan, Margin Software
 - Re-inventing the wheel, every time.

First law of debate:
        Never argue with a fool.  People might not know the difference.

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

Reply via email to