I am trying the following code in Code warrior:

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;
}

It worked, but when I run the code, it compiled successfully but gave me
error as "Couldn't locate the program entry point, program will not stop at
launch". And after this POSE gives error as UIappshell (unknown version)
just read from the memory location 0x00002CF0, which is in unallocated chunk
of memory. And ask for continue or reset.

This code is used to start the application when palm is powered on.

May be I am not registering the notifications properly. Can some one tell me
how to register the notification?

Can some one help me.

Thanks

Prasad



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

Reply via email to