Please do *not* call SysSleep directly. Yes, it's a System-Use-Only function. That means... drumroll please... that it's *not* to be called by 3rd party applications. True, it may put the device to sleep, but at the cost of bypassing the normal SysHandleEvent processing... so the OS doesn't get a chance to notify anyone it's going to sleep... and internal state information gets munged... thus it's guaranteed to break in a future version of the Palm OS (if it doesn't already).
So, the moral of the story is: Don't call System-Use-Only functions. Ever. (Thanks! :o) The only supported method of putting the device to sleep (which works for the vast majority of Palm OS devices on the market) is to enqueue a vchrPowerOff keydown event, then let that event enter SysHandleEvent via your normal main-event-loop processing: EvtEnqueueKey(vchrPowerOff, 0, commandKeyMask); Regards, Jim Schram PalmSource Inc. Partner Engineering -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
