Hi,

All the code that I access during my alarm is in my segment 0, which I assume I have access to during display alarm launch code and dont need to lock them (Correct me if I'm wrong).

I read about DmProtectDatabase and it said one sould protect it in app start and unprotect in app stop. Sould I protect and unprotect the DB in start and end of all launch codes ?

Also, make sure you open your application database, & make sure to open it in leaveopen mode.
I open my 'data' database when I need to write to it and close it soon after that - once during every alarm. Do I need to open in leaveopen mode then ?

I still wonder wat Resco Backup/RLock does in special to Lock my app ?

Regards,
Sagar

----- Original Message ----- From: "Ryan Rix" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Tuesday, January 22, 2008 6:40 PM
Subject: Re: Locking of the background apps ?



Hi,

Basically, to be completely safe, you need to prtoect the database via DmProtectDatabase and then lock each resource that your alarm callback uses (including the code resource that block is in) using DmGetResource and MemHandleLock.

Best regards,
ryan in a rush

Sagar wrote on 1/22/08 6:39 am

Hi All,



My application runs in
background by means of
alarms, where I read from
network and show modal
forms and update database.
The application exhibits
random crashes.

But when I use Resco backup
to lock my application and if I
use Reset Doctor
to clear cache when it gets to
full, my apps runs well in
background.



How do I lock my application?
Does DmProtectDatabase
serve that purpose?



Where am I possibly going
wrong. Any lines to go ahead
?



Regards,

Sagar




--
For information on using the
ACCESS Developer Forums, or
to unsubscribe, please see
http://www.access-
company.com/developers/f
orums/


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/


--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to