Believe it or not, this like may be your problem:

> char *dbNames[] = {/*bunch of strings*/};

Make sure you have the "PC Relative Strings" compiler option turned on,
because otherwise the compiler stores your strings as constant globals...
which, of course, means they aren't available when handling a reset launch code.

Hope this helps,
Jesse





"Jeff Valore" <[EMAIL PROTECTED]> on 07/07/99 02:28:56 PM

Please respond to [EMAIL PROTECTED]

Sent by:  "Jeff Valore" <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:    (Jesse Donaldson/HQ/3Com)
Subject:  SystemReset limitations?




Can someone please explain what the limitations are for a program running
after a reset (responding to a SystemReset launch code).  I know there are
no global variables available, but my program doesn't reference any, and it
still dies on a reset.  It runs fine on normal launch, and it does the exact
same lines of code.

Here is the basic outline of the code:

DWord PilotMain( Word launchCode, Ptr cmdPBP, Word launchFlags)
{
     if(launchCode == Normal or SysReset)
     {
          char *dbNames[] = {/*bunch of strings*/};
          LocalID DbLocalID;
          VoidHand dbImageHandle;
          int currDB;
          void *DBImgPtr;

          // these functions are called in this order
          //   (code inbetween calls is left out...
          //   most is variable assignments + if statements)
          DmFindDatabase();
          DmGetResource();
          DmGetResource();
          DmCreateDatabaseFromImage();
          MemHandleUnlock();
          DmReleaseResource();
     }
}

Hope someone out there can tell me what here I can't do!
Thanks!

-Jeff Valore







Reply via email to