Ok, Sanjay, here's how you do it:

1.  Create a new user event for yourself.  Like EVT_POWERON.

2.  When you get a powerdown event via the power key or the autooff char, add
    a EVT_POWERON event to the event queue

3.  In your event loop (or in process_event()), watch for the
    EVT_POWERON, and when it appears, do your check ie, see if you need
    to ask for a password.

The tricky bit is that an event sent after the powerdown event, arrives
when the unit awakes!  Which is the point.

Cheers,
Sanjay Vakil, PhD.

ps.  You're right.  It isn't rocket science.  I should know!

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

Reply via email to