They told us: nothing before switch(launchCode)
(only declarations, of course)
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, August 04, 1999 11:17 AM
> To: [EMAIL PROTECTED]
> Subject: How to automaticaly start an application after reset
>
> I am trying to have my application run automaticaly after the reset and
> hot-sync.
>
> This subject have been probably already discussed in the group, however
> somehow
> I may not find the right reference in the archive. BTW: egroups are pretty
> clumsy in terms of searching of the archive.
>
> I figured out (possibly wrong) that the code should look somewhat like
> this:
>
> PilotMain(...)
> {
> ....
> LocalID lid=DmFindDatabase(0,"AppName") ;
>
> switch( launchCode)
> {
> case sysAppLaunchCmdSyncNotify:
> case sysAppLaunchCmdSystemReset:
> AlmSetAlarm(0,lid,0,TimGetSeconds()+1,0) ;
> break ;
> case sysAppLaunchCmdDisplayAlarm:
> SysUIAppSwitch(0,lid,sysAppLaunchNormalLaunch,NULL) ;
> break ;
> case sysAppLaunchCmdNormalLaunch:
> // usual stuff
> break ;
> }
> }
>
>
> In this set-up Palm hangs-up on the logo screen - only hard reset helps.
>
> 1. How should it be done the right way?
> 2. How to debug reset launch code?
> 3. If AlmSetAlarm is to be used, what should be the timeout?
> 4. Could anyone give me the reference to the thread which discussed those
> issue?
>
> Thanks in advance for your help,
> Marcin
>
>
>