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