Hi Friends,

This question is specfic to M125 device Security Application.  I am
developing a customized application which should go to sleep mode when the
user presses the ON/OFF switch.  If the user had set a PASSWORD, the device
should prompt for password, irrespective of whichever application the user
is working in, when the user switches ON the device back.

The problem i am facing is, the application displays an error message which
I have given below, whenever the notification fires and tries to display the
LOCKDEVICE2FORM.

ERROR MESSAGE:
===============
    "Applications" 4.0 reports "MemoryMgr.c, Line 4365, NULL handle". If
this is the latest version
    of "Applications", please report this to the application author.

    If I press CONTINUE to the message, the error message2 is displayed
which says the application
    had performed a Bus error.


I am using :
                  PalmOS40-efigs-color.rom
                  Palm OS Emulator 3.0a8.
                  Palm OS version 3.5

Could someone please help me on this.  Thanks a lot.  Regards
Yuva

=============================================================
part of the code:
-----------------------
UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
{
    Err err;
 EventType eventP;
 UInt16 cardNo;
 LocalID dbID;
    SleepEventParamType *notify;
 SysNotifyParamType  *notify2;
    DmSearchStateType sst;


    if (cmd == sysAppLaunchCmdNormalLaunch)
    {
        SysCurAppDatabase(&cardNo, &dbID);
        SysNotifyRegister(cardNo, dbID, sysNotifySleepRequestEvent, 0,0,0);
        SysNotifyRegister(cardNo, dbID, sysNotifyLateWakeupEvent, 0,0,0);
        SysNotifyRegister(cardNo, dbID, sysNotifySleepNotifyEvent, 0,0,0);
        err = AppStart();
        if (err) return err;
        FrmGotoForm(MainForm);
       AppEventLoop();
       AppStop();
   }else if (cmd == sysAppLaunchCmdNotify)
    {
      notify = (SleepEventParamType *) cmdPBP;
      notify2 = (SysNotifyParamType *) cmdPBP;
      if (notify2->notifyType == sysNotifySleepNotifyEvent)
       {
            FrmGotoForm(LockDevice2Form);
       }

   }
 return 0;
}
============================================================================
========
static Boolean LockDevice2FormHandleEvent(EventPtr eventP)
{
    Boolean handled = false;
    FormPtr frmP;

 switch (eventP->eType)
  {
   case frmOpenEvent:
   {
    frmP = FrmGetActiveForm();
    checkedOk=false;
    FrmDrawForm (frmP);
    handled = true;
    break;
   }

  }
 return handled;
}





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

Reply via email to