Tam asked; > Is there a way to programmatically turn off a Palm device? Stephen Said; > You may use the following function call to turn off Palm, > SysSleep(false, false); // force to sleep KC Said; > Hi, why make that much of a risky fuss about it? > Just enqueque a powerOffChr as a keyDownEvent into the event queue
Tam, PLEASE PLEASE go with what KC said and use the EvtEnqueueKey(). If you call SysSleep() directly, the notifications sysNotifySleepNotifyEvent and/or sysNotifySleepRequestEvent may not get sent to other applications to let them know that the device is going to sleep. Many Palms have died as a result of this. One of the applications we have out there would kill your batteries overnight if it did not receive one or the other of these events, as it's constantly polling in the background whilst the device is awake. If it doesn't get told the device is going to sleep it won't stop polling - bye bye data. Regards John Sutton -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
