Do you know the process the system goes through to cancel an alarm? The reason
I ask is that I set an alarm function:
SetSysProcAlarm((AlmAlarmProcPtr)HandleAlarm, 0x8001,
RECHECK_TIME_WHILE_APP_RUNNING);
void HandleAlarm(UInt16 almProcCmd, SysAlarmTriggeredParamType *paramP)
{
if(paramP->purgeAlarm == true)
break;
FrmGotoForm(RefreshInboxForm);
SetSysProcAlarm((AlmAlarmProcPtr)HandleAlarm, 0x8001,
RECHECK_TIME_WHILE_APP_RUNNING);
}
Right before I close the app (after vchrLaunch is pressed), I call
SetSysProcAlarm((AlmAlarmProcPtr)HandleAlarm, 0x8001, 0);
For some reason though, shortly after my app exits, the alarm is called again,
but since the app is no longer locked, the phone crashes b/c it tries calling a
function at a now random location in memory.
Just as a dry run, I tried doing:
SetSysProcAlarm((AlmAlarmProcPtr)HandleAlarm, 0x8001,
RECHECK_TIME_WHILE_APP_RUNNING);
SetSysProcAlarm((AlmAlarmProcPtr)HandleAlarm, 0x8001, 0);
and the HandleAlarm function is called with exactly the same
SysAlarmTriggeredParamType *paramP, even down to paramP->purgeAlarm equaling
false.
Has anyone else run into this issue with SetSysProcAlarm?
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/