What is the best way to use handle this event? I have a chunk of lengthy code
I wish to have run -once-, then let the system continue.
SysNotifyRegister ( cardNo, dbID, sysNotifySleepRequestEvent, NULL,
sysNotifyNormalPriority, 0);
Now what? Something like the following?
static void HandleNotification(SysNotifyParamType *np) {
SleepEventParamType *data;
switch ( np->notifyType ) {
case sysNotifySleepRequestEvent:
data = (SleepEventParamType *)np->notifyDetailsP;
if ( data->reason == sysSleepPowerButton ) {
// do my code?
}
break;
}
}
--
Matthew (Darkstorm) Bevan [EMAIL PROTECTED]
Margin Software, NECTI. http://www.marginsoftware.com
Re-inventing the wheel, every time.
- A city is a large community where people are lonesome together
-- Herbert Prochnow
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/