>I used the following code to sublaunch app. B from
>app. A, while app. B having its own global variables.
>
>SysAppLaunch (0 , dstID, sysAppLaunchFlagNewGlobals,
>sysAppLaunchCmdNormalLaunch, testPSP,&resultP);
>
>I was able to go back and forth for around 14 times...


Doing that isn't supported; you're passing parameters to SysAppLaunch which
are for internal use, and the system assumes that when a NormalLaunch
application quits, that the currently running application has really quit,
and has cleaned up itself completely, which includes releasing its owner ID.

There isn't any supported (which in this sense means guaranteed to work)
mechanism to have the OS allocate globals for a sublaunched application
reliably.  You might be able to hack it, or might not - but this is beyond
what is guaranteed to work so you're really on your own.

You could always get the 3.0 OS source code and see what happens in
SysAppLaunch and the things it calls, and see if you can find a way to do
it... you could well get it working that way.  But even if you do, it won't
be guaranteed to work when the OS changes.

-David Fedor
Palm Developer Support


Reply via email to