On page 59 in the PalmOS Programmers companion it says that:
"When calling SysAppLaunch do not set launch flags yourself-the
SysAppLaunch function sets launch flags appropriately for you."
Also, in the Reference, it says that the "launchFlags" parameter
in SysAppLaunch(...) should be set to 0. When you use
SysAppLaunch(...) in your function below, you havn't followed
these guidelines. Doesn't that cause any problems?
Regards,
/Bulent Gecer
Jon Baer <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
>
> Utility method I had laying around:
>
> // Relaunches an application with globals enabled.
> // creatorID -- the creatorID of the application
> // cmd -- the launch code
> // cmdPBP -- the launch parameter block
> // ret -- holds the return value after the launch
> // Returns: non-zero if the launch failed
>
> Err RelaunchWithGlobals( ULong creatorID, Word cmd,
> Ptr cmdPBP, DWord *ret )
> {
> UInt card;
> LocalID id;
> Err err = sysErrNotAllowed;
> DmSearchStateType stateInfo;
>
> if( DmGetNextDatabaseByTypeCreator( true, &stateInfo,
> 'appl', creatorID,
> true, &card, &id ) == 0 ){
> err = SysAppLaunch( card, id,
> sysAppLaunchFlagNewGlobals |
sysAppLaunchFlagNewStack,
> cmd, cmdPBP, ret );
> }
>
> return err;
> }
>
>
>
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/