Thanks for the help. I have copied my code in sample switch project. It
worked but I am getting error at AppStart() saying can't referenced from
Pilotmain is undefined. I am using following code to start the application
when palm is powered on. Please help me on this.

#include <PalmOS.h>

UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
{
    Err err;
 EventType eventP;
 UInt16 cardNo;
 LocalID dbID;
 SysNotifyParamType  *notify;
    DmSearchStateType sst;
 UInt32 result;
 UInt32 dwResult,currServiceID;

    if (cmd == sysAppLaunchCmdNormalLaunch)
    {
        SysCurAppDatabase(&cardNo, &dbID);
        SysNotifyRegister(cardNo, dbID, sysNotifyLateWakeupEvent, 0,0,0);
        err = AppStart();
 }else if (cmd == sysAppLaunchCmdNotify)
    {
      notify = (SysNotifyParamType *) cmdPBP;
      if(notify->notifyType == sysNotifyLateWakeupEvent)
   {
  err = DmGetNextDatabaseByTypeCreator(true, &sst,
  sysFileTApplication, sysFileCGeneral, true, &cardNo, &dbID);
  if (dbID)
      {
       SysUIAppSwitch(cardNo, dbID, 0, 0);
      }
    }
    }
 return 0;
}


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to