Sagar wrote on 1/24/08 5:20 am
>
>>> You NEED to lock your
>code into memory via
>MemHandleLock.
>How do I get the handle of
>my code ?
>
MemHandle codeRes=DmGet1Resource('code', myCodeRes); // whichever code resource
the callback is in
void* codePtr = MemHandleLock(codeRes);
// store pointer somewhere persistant so that you can unlock the code when
application is finished doing its business...
>>> If you are programming
>for an NVFS device, do your
>users a favor and lock
>>> the resources yourself .
>I wanna support NVFS devices
>too. But how do I lock my
>resoources?
>Usually for any displaying
>any resource I get the
>resource, lock it, draw it
>and then unlock it.
>
>What I do is :
>* Register a callback function
>for alarms on app exit.
>* In the callback I read the
>network data and decide - do
>I need to show any
>form on this data?
>* If so, I fire a custom
>notification, and on launch
>code of notification, I
>update the database and
>preferences and display the
>data as needed.
This all sounds good but be aware, the code segment has to be locked. you can
get away with locking other resources you need in the callback, but dont skimp
on said callback!
~Ryan
Thanks and Best regards,
Ryan Rix
TamsPalm- The PalmOS Blog
Jasmine Bowden - Class of 2009, Marc Rasmussen - Class of 2008, Erica Sheffey -
Class of 2009, Rest in peace. You will not be forgotten.
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/