Hello folks,

As we know, the global variables are not available when the application is 
being launched with non-normal system launch codes. However, will they be 
available if the application launches itself with a custom launch code? For 
instance, something like this:

#define creatorID 'Test'
#define sysAppLaunchCustomCode 0x8001
//sysAppLaunchCmdCustomBase + 1

UInt32 PilotMain (UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
{
    DmSearchStateType stateInfo;
    UInt16 cardNo;
    LocalID dbID;

    switch (cmd)
    {
        case sysAppLaunchCmdSystemReset:
            // Global variables are not available at this point
            DmGetNextDatabaseByTypeCreator (true, &stateInfo, 'appl', 
creatorID, true, &cardNo, &dbID);
            SysUIAppSwitch (cardNo, dbID, sysAppLaunchCustomCode, NULL);
            break;
        case sysAppLaunchCustomCode:
            // But are global variables available here?
            break;
        default:
            break;
    }
    return 0;
}

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

Reply via email to