it may be best to just post a power button message in your appstop handler.

----- Original Message -----
From: "Ben Combee" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 10:48 AM
Subject: Re: Putting the palm to sleep?


> "herry" <[EMAIL PROTECTED]> wrote in message news:37827@palm-dev-forum...
> >
> > Anyone know how to put the palm to sleep immediately?   I can simulate
the
> > power button, but this works only if the application is currently
running.
> > I need to turn off the palm just as the application is quitting.
>
> SysSleep() is the undocumented function that the OS uses interally to put
> itself to sleep.  However, by going directly to this code, you'll risk
> upsetting anything which the OS hooks into the vchrPowerOff and
vchrAutoOff
> character handling.  It may be better to just fabricate a vchrPowerOff
> keyDown event and pass that directly to SysHandleEvent in your AppStop
> code -- however, as exposed recently, this technique won't work if you use
> the vchrAutoOff because the Handspring Visor devices don't honor that
> character except under certain circumstances.
>
> --
> Ben Combee
> Veriprise Wireless <http://www.veriprise.com>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


-- 
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