This chapter provides reference documentation for the Application Manager, which you use to launch Palm OS applications programmatically. The contents of this chapter are organized as follows:
Application Manager Structures and Types
Application Manager Constants
Application Manager Functions and Macros
The header file AppMgr.h
declares the API that this chapter describes.
For more information on how Palm OS applications are launched, see "Application Start and Stop."
Application Manager Structures and Types
ARMAppLaunchPrefsType Struct
Purpose
ARM application's launch preferences.
Declared In
AppMgr.h
Prototype
typedef struct ARMAppLaunchPrefsType { uint32_t version; uint32_t reserved1; uint32_t reserved2; uint32_t stackSize; uint32_t flags; } ARMAppLaunchPrefsType
Fields
-
version
- Version of this structure. See "Launch Preferences Structure Versions" for the values that this field can assume.
-
reserved1
- Reserved for future use.
-
reserved2
- Reserved for future use.
-
stackSize
- Not used in Palm OS Cobalt. This field should always have a value of 0.
-
flags
- Any combination of the launch flags listed under "Launch Preference Flags."
Example
You can obtain an application's launch preferences using code similar to the following:
DmOpenRef openRef; // Open the database openRef = DmOpenDatabase(dbID, dmModeReadOnly); if (openRef) { // Look for its launch preferences. MemHandle resH = DmGetResource(openRef, sysResTAppLaunchPrefsLE32, sysResIDDefault); if (resH) { ARMAppLaunchPrefsType *launchPrefs = (ARMAppLaunchPrefsType *)MemHandleLock(resH); // Do something with the launch prefs here MemHandleUnlock(resH); DmReleaseResource(resH); } }
ImportExportRecordParamsType Struct
Purpose
Parameter block passed with the sysAppLaunchCmdImportRecord
, sysAppLaunchCmdMoveRecord
, sysAppLaunchCmdExportRecord
and sysAppLaunchCmdDeleteRecord
launch codes.
Declared In
AppMgr.h
Prototype
typedef struct { uint32_t index; uint32_t destIndex; uint32_t uniqueID; MemHandle vObjectH; } ImportExportRecordParamsType
typedef ImportExportRecordParamsType *ImportExportRecordParamsPtr;
Fields
-
index
- Index of the database record to be exported, moved, or deleted, or
dmMaxRecordIndex
if theuniqueID
field identifies the record. When importing, this value is ignored. This value is updated after the sublaunch. -
destIndex
- Index of the destination location for the record to be moved when the launch code is
sysAppLaunchCmdMoveRecord
. -
uniqueID
- The record's unique ID. This field is ignored unless the
index
field is set todmMaxRecordIndex
. When importing, if this field is set to a valid record unique ID (other thandmUnusedRecordID
) the imported record should replace the one specified. -
vObjectH
- Memory handle for the location that contains the record being exported or the location where the record being imported is to be stored.
SysAppLaunchCmdCardType Struct
Purpose
Parameter block that accompanies a sysAppLaunchCmdCardLaunch
launch code.
Declared In
AppMgr.h
Prototype
typedef struct { status_t err; uint16_t volRefNum; uint16_t _reserved1; const char *path; uint16_t startFlags; uint16_t padding; } SysAppLaunchCmdCardType
Fields
-
← err
- Initially set to
expErrUnsupportedOperation
, applications that recognizesysAppLaunchCmdCardLaunch
and that don't want to receive the subsequentsysAppLaunchCmdNormalLaunch
launch code should set this field toerrNone
. -
→ volRefNum
- The reference number of the volume from which the application is being launched.
-
_reserved1
- Reserved for future use.
-
→ path
- The complete path to the application being launched.
-
↔ startFlags
- A combination of the flags listed under "Expansion Card Launch Flags."
-
padding
- Padding bytes.
SysAppLaunchCmdFailedAppNotifyType Struct
Purpose
Parameter block that accompanies a sysAppLaunchCmdFailedAppNotify
launch code. This structure identifies both the failed application and the reason for failure.
Declared In
AppMgr.h
Prototype
typedef struct { uint32_t creator; uint32_t type; status_t result; } SysAppLaunchCmdFailedAppNotifyType
Fields
-
creator
- The failed application's creator ID.
-
type
- The failed application's type.
-
result
- The error code returned from the failed application.
SysAppLaunchCmdHandleSyncCallAppType Struct
Purpose
Parameter block that accompanies a sysAppLaunchCmdHandleSyncCallApp
launch code. This structure contains all of the information passed to SyncCallRemoteModule()
on the desktop plus the fields needed to pass the result back to the desktop.
Declared In
AppMgr.h
Prototype
typedef struct SysAppLaunchCmdHandleSyncCallAppType { uint16_t pbSize; uint16_t action; void *paramP; uint32_t dwParamSize; void *dlRefP; Boolean handled; uint8_t _reserved1; uint16_t _reserved2; status_t replyErr; uint32_t dwReserved1; uint32_t dwReserved2; } SysAppLaunchCmdHandleSyncCallAppType
Fields
-
pbSize
- Size, in bytes, of this parameter block. Set to
sizeof(SysAppLaunchCmdHandleSyncCallAppType)
. -
action
- Call action ID (application-specific).
-
paramP
- Pointer to parameter block (call action ID specific).
-
dwParamSize
- Parameter block size, in bytes.
-
dlRefP
- DesktopLink reference pointer. Supply this value in the
DlkCallAppReplyParamType
structure when callingDlkControl()
with thedlkCtlSendCallAppReply
control code. -
handled
- Initialized to
false
by DLServer; if handled, your application must set it totrue
(and your handler the handler must callDlkControl
with thedlkCtlSendCallAppReply
control code). If your handler is not going to send a reply back to the conduit, leave this field set tofalse
, in which case the DesktopLink Server will send the default "unknown request" reply. -
_reserved1
- Reserved. Set to
NULL
. -
_reserved2
- Reserved. Set to
NULL
. -
replyErr
- Error code returned from the call to
DlkControl()
with thedlkCtlSendCallAppReply
control code. -
dwReserved1
- Reserved. Set to
NULL
. -
dwReserved2
- Reserved. Set to
NULL
.
SysAppLaunchCmdInitDatabaseType Struct
Purpose
Parameter block that accompanies a sysAppLaunchCmdInitDatabase
launch code.
Declared In
AppMgr.h
Prototype
typedef struct SysAppLaunchCmdInitDatabaseType { DmOpenRef dbP; uint32_t creator; uint32_t type; uint16_t version; uint16_t padding; } SysAppLaunchCmdInitDatabaseType
Fields
-
dbP
- Handle of the newly-created database, already open for read/write access.
-
creator
- Creator ID of the newly-created database.
-
type
- Type of the newly-created database.
-
version
- Version number of the newly-created database.
-
padding
- Padding bytes.
Comments
IMPORTANT: The
sysAppLaunchCmdInitDatabase
launch code handler must leave the database handle open on return.
SysAppLaunchCmdOpenDBType Struct
Purpose
Parameter block that accompanies a sysAppLaunchCmdOpenDB
launch code.
Declared In
AppMgr.h
Prototype
typedef struct { MemHandle dbH; } SysAppLaunchCmdOpenDBType
Fields
SysAppLaunchCmdPnpsType Struct
Purpose
Parameter block that accompanies a sysAppLaunchPnpsPreLaunch
launch code.
Declared In
AppMgr.h
Prototype
typedef struct { status_t error; uint16_t volRefNum; uint16_t slotLibRefNum; uint16_t slotRefNum; uint16_t _reserved1; } SysAppLaunchCmdPnpsType
Fields
-
error
- Error code returned from the pre-launch application. Set this field
errNone
to prevent the application from receiving asysAppLaunchCmdNormalLaunch
launch code. -
volRefNum
- Volume reference number, or zero if a file system wasn't mounted.
-
slotLibRefNum
- Slot driver library reference number. This field is always valid for a slot driver call.
-
slotRefNum
- Slot reference number. This field is always valid for a slot driver call.
-
_reserved1
- Reserved for future use.
SysAppLaunchCmdSaveDataType Struct
Purpose
Parameter block that accompanies a sysAppLaunchCmdSaveData
launch code.
Declared In
AppMgr.h
Prototype
typedef struct { Boolean uiComing; uint8_t reserved1; } SysAppLaunchCmdSaveDataType
Fields
-
uiComing
-
true
if the system dialog is displayed before launch code arrives. -
reserved1
- Reserved for future use.
SysAppLaunchCmdSyncCallApplicationTypeV10 Struct
Purpose
Declared In
AppMgr.h
Prototype
typedef struct SysAppLaunchCmdSyncCallApplicationTypeV10 { uint16_t action; uint16_t paramSize; void *paramP; uint8_t remoteSocket; uint8_t tid; Boolean handled; uint8_t reserved1; } SysAppLaunchCmdSyncCallApplicationTypeV10
Fields
SysAppLaunchCmdSystemResetType Struct
Purpose
Parameter block that accompanies a sysAppLaunchCmdSystemReset
launch code.
Declared In
AppMgr.h
Prototype
typedef struct { Boolean hardReset; Boolean createDefaultDB; } SysAppLaunchCmdSystemResetType
Fields
-
hardReset
-
true
if system was hard reset.false
if system was soft reset. -
createDefaultDB
- If
true
, application has to create default database.
PilotMainType Typedef
Purpose
Type used to declare pointers to a PilotMain()
function.
Declared In
AppMgr.h
Prototype
typedef uint32_t (PilotMainType) (uint16_tcmd
, void*cmdPBP
, uint16_tlaunchFlags
)
See Also
Application Manager Constants
Expansion Card Launch Flags
Purpose
Used in combination to specify how sysAppLaunchCmdCardLaunch
is to operate. Supply one or more of these flags to the startFlags
field of the SysAppLaunchCmdCardType
structure that accompanies the launch code.
Declared In
AppMgr.h
Constants
-
#define sysAppLaunchStartFlagAutoStart 0x0001
- Indicates that the application is being run automatically upon card insertion.
-
#define sysAppLaunchStartFlagNoAutoDelete 0x0004
- Prevents the VFS Manager from deleting the copy of the application in main memory when the associated volume is unmounted.
-
#define sysAppLaunchStartFlagNoUISwitch 0x0002
- Prevents a UI switch to the auto-launched application.
Launch Preference Flags
Purpose
Flags that control how an ARM application is launched. These flags can be used in combination to make up the value of the ARMAppLaunchPrefsType
structure's flags
field.
Declared In
AppMgr.h
Constants
-
#define ARMAppLaunchPrefsFindNotification 0x02
- If set, the application is a sent a
sysAppLaunchCmdFind
launch code upon launch. -
#define ARMAppLaunchPrefsNoOverlay 0x20
-
#define ARMAppLaunchPrefsResetNotification 0x01
- If set, the application is a sent a
sysAppLaunchCmdSystemReset
launch code upon launch. -
#define ARMAppLaunchPrefsTimeChangeNotification 0x04
- If set, the application is a sent a
sysAppLaunchCmdTimeChange
launch code upon launch. -
#define ARMAppLaunchPrefsReserved 0xffffffd8
- Reserved flag bits. The corresponding bits in the
ARMAppLaunchPrefsType
structure'sflags
field must be set to zero.
Launch Preferences Structure Versions
Purpose
Identify the version of the ARMAppLaunchPrefsType
structure. That structure's version
field should contain one of these values.
Declared In
AppMgr.h
Constants
-
#define ARMAppLaunchPrefsTypeVersion60 1
- The first version of the structure as defined in Palm OS Cobalt, version 6.0.
-
#define ARMAppLaunchPrefsTypeVersionCurrent ARMAppLaunchPrefsTypeVersion60
- The current version of the structure.
Miscellaneous Application Manager Constants
Purpose
The Application Manager header file also defines these constants.
Declared In
AppMgr.h
Constants
Application Manager Functions and Macros
PilotMain Function
Purpose
The entry point for all Palm OS applications, this function's sole purpose is to receive and respond to launch codes.
Declared In
AppMgr.h
Prototype
uint32_t PilotMain ( uint16_tcmd
, void*cmdPBP
, uint16_tlaunchFlags
)
Parameters
-
→ cmd
- The launch code to which your application is to respond. See Chapter 6, "Common Launch Codes," for a list of predefined launch codes. You may create additional launch codes; see "Creating Your Own Launch Codes."
-
→ cmdPBP
- A pointer to a structure containing any launch-command-specific parameters, or
NULL
if the launch code has none. See the description of each launch code for a description of the parameter structure that accompanies it, if any. -
→ launchFlags
- Flags that indicate whether your application's global variables are available, whether your application is now the active application, whether it already was the active application, and so on. See "Launch Flags" for a list of launch flags.
Returns
Return errNone
if your application processed the launch code successfully, or an appropriate error code if there was a problem. When another application invokes your application using SysAppLaunch()
, this value is returned to the caller.
Comments
See Chapter 2, "Application Start and Stop," for a discussion on how applications receive and handle launch codes, with examples.
SysAppLaunch Function
Purpose
Launch an application as a subroutine of the caller in the caller's process (irrespective of whether or not the application being launched is already running in another process).
NOTE: Applications should avoid this function; they should use
SysAppLaunchLocal()
or SysAppLaunchRemote()
instead.
Declared In
AppMgr.h
Prototype
status_t SysAppLaunch ( DatabaseIDdbID
, uint16_tcmd
, void *cmdPBP
, uint32_t*resultP
)
Parameters
-
→ dbID
- The database ID of the resource database containing the application to launch.
-
→ cmd
- Launch code passed to the launched application's
PilotMain()
function. -
→ cmdPBP
- Pointer to the launch code parameter block.
-
← resultP
- The value returned from the application's
PilotMain()
routine.
Returns
Returns errNone
if the application was launched successfully.
Comments
Applications can use SysAppLaunch()
to send a specific launch code to another application and have control return to the calling application when finished. This function in effect makes the specified application a subroutine of the caller. If you want to actually close your application and call another application, use SysUIAppSwitch()
instead of this function. SysUIAppSwitch()
sends the current application an appStopEvent
and then starts the specified application.
Do not use this function to open the system-supplied Launcher application. If another application has replaced the default launcher with one of its own, this function will open the custom launcher instead of the system-supplied one. To open the Launcher reliably, enqueue a keyDownEvent
that contains a launchChr
.
You can call this function only in the context of the main UI application thread. To invoke the PilotMain()
procedure of any application in the context of another thread, use SysLoadModule()
and SysGetEntryAddresses()
instead.
If the target application happens to be the same as the root application of the calling process, the target application's PilotMain()
is re-entered in the context of the calling thread. In this case the sysAppLaunchFlagSubCall
launch flag is set.
Before the PilotMain()
procedure of the target application is entered, the database of the target application is opened and added to the default resource search chain. After the target application's PilotMain()
exits, that database is closed. If the closing causes the open count of the database to become zero, the database is removed from the default resource search chain.
NOTE: For important information regarding the correct use of this function, see Chapter 2, "Application Start and Stop."
See Also
SysBroadcastActionCode()
, SysUIAppSwitch()
, SysCurAppDatabase()
SysAppLaunchLocal Function
Purpose
Launch an application as a subroutine of the caller in the caller's process, unless the application is already running in another process. If the application is already running in another process the launch code and parameters are sent to the running application.
Declared In
AppMgr.h
Prototype
status_t SysAppLaunchLocal ( DatabaseIDdbID
, uint16_tcmd
, void *cmdPBP
, uint32_tcmdPBSize
, uint32_t*resultP
)
Parameters
-
→ dbID
- The database ID of the resource database containing the application to launch.
-
→ cmd
- Launch code passed to the launched application's
PilotMain()
function. -
→ cmdPBP
- Pointer to the launch code parameter block.
-
→ cmdPBSize
- Size, in bytes, of the launch code parameter block.
-
← resultP
- The value returned from the application's
PilotMain()
routine.
Returns
Returns errNone
if the application was launched successfully.
Comments
A local sublaunch becomes a local subroutine invocation in the same process.
See Also
SysAppLaunch()
, SysAppLaunchRemote()
SysAppLaunchRemote Function
Purpose
Launch an application as a subroutine of the caller in a separate, newly-created process, unless the application is already running in another process. If the application is already running in another process the launch code and parameters are sent to the running application.. Remote launching allows applications to execute untrusted code without compromising their own security.
Declared In
AppMgr.h
Prototype
status_t SysAppLaunchRemote ( DatabaseIDdbID
, uint16_tcmd
, void *cmdPBP
, uint32_tcmdPBSize
, uint32_t*resultP
)
Parameters
-
→ dbID
- The database ID of the resource database containing the application to launch.
-
→ cmd
- Launch code passed to the launched application's
PilotMain()
function. -
→ cmdPBP
- Pointer to the launch code parameter block. If
cmdPBSize
is non-zero,cmdPBP
is interpreted as the address of a block of memory whose size iscmdPBSize
bytes. If the target application is started in a separate transient process, the contents of that memory block are copied to the transient process, and the address of that copy is passed to the target application'sPilotMain()
procedure as thecmdPBP
parameter. - If
cmdPBSize
is zero, the value ofcmdPBP
is passed as-is to the target application'sPilotMain()
procedure as thecmdPBP
parameter. No memory is copied even if the target application is started in a separate process. -
→ cmdPBSize
- Size, in bytes, of the launch code parameter block, or zero if the
cmdPBP
parameter is to be passed as-is to the launched application'sPilotMain()
function. -
← resultP
- The value returned from the application's
PilotMain()
function.
Returns
Returns errNone
if the application was launched successfully.
Comments
This function creates a separate transient process in which to execute the target application, unless the target application happens to be the same as the root application of the calling process—in which case SysAppLaunchRemote()
simply performs a local sublaunch as SysAppLaunch()
does.
See Also
SysAppLaunch()
, SysAppLaunchLocal()
SysAppLaunchV40 Function
Purpose
Launch a specified application as a subroutine of the caller.
Declared In
AppMgr.h
Prototype
status_t SysAppLaunchV40 ( uint16_tcardNo
, LocalIDdbID
, uint16_tlaunchFlags
, uint16_tcmd
, MemPtrcmdPBP
, uint32_t*resultP
)
Parameters
-
→ cardNo
- The card number of the resource database containing the application to launch.
-
→ dbID
- The local ID of the resource database containing the application to launch.
-
→ launchFlags
- Set to 0.
-
→ cmd
- Launch code.
-
→ cmdPBP
- Launch code parameter block.
-
← resultP
- The value returned from the application's
PilotMain()
routine.
Returns
Returns errNone
if no error, or one of sysErrParamErr
, memErrNotEnoughSpace
, or sysErrOutOfOwnerIDs
.
Comments
Applications can use SysAppLaunch()
to send a specific launch code to another application and have control return to the calling application when finished. This function in effect makes the specified application a subroutine of the caller. If you want to actually close your application and call another application, use SysUIAppSwitch()
instead of this function. SysUIAppSwitch()
sends the current application an appStopEvent
and then starts the specified application.
Do not use this function to open the system-supplied Application Launcher application. If another application has replaced the default launcher with one of its own, this function will open the custom launcher instead of the system-supplied one. To open the system-supplied launcher reliably, enqueue a keyDownEvent
that contains a launchChr
.
NOTE: For important information regarding the correct use of this function, see Chapter 2, "Application Start and Stop."
Compatibility
This function is provided for compatibility purposes only. Applications should use SysAppLaunch()
instead.
See Also
SysBroadcastActionCode()
, SysUIAppSwitch()
, SysCurAppDatabase()
SysBroadcastActionCode Function
Purpose
Send the specified action code (launch code) and parameter block to the latest version of every UI application.
Declared In
AppMgr.h
Prototype
status_t SysBroadcastActionCode ( uint16_tcmd
, void*cmdPBP
)
Parameters
Returns
Returns errNone
if no error, or one of the following errors: sysErrParamErr
, memErrNotEnoughSpace
, or sysErrOutOfOwnerIDs
.
See Also
SysAppLaunch()
, Chapter 2, "Application Start and Stop,"
SysCurAppDatabase Function
Purpose
Get the database ID of the current application's resource database.
Declared In
AppMgr.h
Prototype
status_t SysCurAppDatabase (
DatabaseID *dbIDP
)
Parameters
Returns
Returns errNone
if no error, or sysErrParamErr
if an error occurs.
See Also
SysAppLaunch()
, SysGetModuleDatabase()
, SysUIAppSwitch()
SysCurAppDatabaseV40 Function
Purpose
Get the card number and database ID of the current application's resource database.
Declared In
AppMgr.h
Prototype
status_t SysCurAppDatabaseV40 ( uint16_t*cardNoP
, LocalID*dbIDP
)
Parameters
-
← cardNoP
- Pointer to the location in memory where the card number is to be written.
-
← dbIDP
- Pointer to the location in memory where the database ID is to be written.
Returns
Returns errNone
if no error, or sysErrParamErr
if an error occurs.
Compatibility
This function is provided for compatibility purposes only. Applications should use SysCurAppDatabase()
instead.
See Also
SysAppLaunch()
, SysUIAppSwitch()
SysGetStackInfo Function
Purpose
Locate the start and end of the current thread's stack.
Declared In
AppMgr.h
Prototype
Boolean SysGetStackInfo ( void**startPP
, void**endPP
)
Parameters
-
← startPP
- Upon return, points to the start of the stack.
-
← endPP
- Upon return, points to the end of the stack.
Returns
Returns true
if the stack has not overflowed, that is, the value of the stack overflow address has not been changed. Returns false
if the stack overflow value has been overwritten, meaning that a stack overflow has occurred.
SysReset Function
Purpose
Perform a soft reset and reinitialize the globals and the dynamic memory heap.
Declared In
AppMgr.h
Prototype
void SysReset ( void )
Parameters
Returns
Comments
This routine resets the system, reinitializes the globals area and all system managers, and reinitializes the dynamic heap. All database information is preserved. This routine is called when the user presses the reset switch on the device.
SysUIAppSwitch Function
Purpose
Try to make the current UI application quit and then launch the UI application specified by database ID.
Declared In
AppMgr.h
Prototype
status_t SysUIAppSwitch ( DatabaseIDdbID
, uint16_tcmd
, void *cmdPBP
, uint32_tcmdPBSize
)
Parameters
-
→ dbID
- Database ID of the new application's resource database.
-
→ cmd
- Launch code.
-
→ cmdPBP
- Pointer to the launch code parameter block, or
NULL
if you don't need to pass a parameter block to the application. -
→ cmdPBSize
- Size, in bytes, of the parameter block pointed to by
cmdPBP
.
Returns
Returns errNone
if the application switch was performed successfully.
Comments
When you launch an application using SysUIAppSwitch()
you have the option to pass a parameter block (using the cmdPBP
parameter) containing application-specific information to the application being launched. To create this parameter block, allocate it using MemPtrNew()
and then call MemPtrSetOwner()
to set the block's owner ID to 0. This assigns ownership of the block to the system; memory blocks owned by the system aren't automatically freed when the calling application exits. Once ownership of the block has been assigned to the system, neither the launching nor the launched application need worry about freeing the block since the operating system will do this itself after the launched application exits.
Note that your parameter block must be self contained. That is, it must not have pointers to anything on the stack or to memory blocks that are owned by an application. If you don't need to pass a parameter block to the application being launched, pass NULL
for the cmdPBP
parameter.
Do not use SysUIAppSwitch()
to open the system-supplied Application Launcher application. If a third-party launcher is installed, you'll likely want to launch that one instead. To do this, enqueue a keyDownEvent
that contains a launchChr
. This will run whatever is run whenever the user taps the Applications icon.
See Also
SysAppLaunch()
, Chapter 2, "Application Start and Stop,"
SysUIAppSwitchV40 Function
Purpose
Try to make the current UI application quit and then launch the UI application specified by card number and database ID.
Declared In
AppMgr.h
Prototype
status_t SysUIAppSwitchV40 ( uint16_tcardNo
, LocalIDdbID
, uint16_tcmd
, MemPtrcmdPBP
)
Parameters
-
→ cardNo
- Card number for the new application; currently only card 0 is valid.
-
→ dbID
- Local ID of the new application's resource database.
-
→ cmd
- Action code (launch code).
-
→ cmdPBP
- Action code (launch code) parameter block.
Returns
Returns errNone
if the application switch was performed successfully.
Comments
May display a fatal error message if the cardNo
parameter is invalid. On debug ROMs, displays a fatal error message if there is no currently running application.
Do not use this function to open the system-supplied Application Launcher application. If a third-party launch is installed, you'll likely want to launch that one instead. To do this, enqueue a keyDownEvent
that contains a launchChr
. This will run whatever is run whenever you tap on the Applications icon.
If you are passing a parameter block (the cmdPBP
parameter), you must set the owner of the parameter block chunk to the operating system. To do this, and for more information, see MemPtrSetOwner()
. If the parameter block structure contains references by pointer or handle to any other chunks, you also must set the owner of those chunks by using MemHandleSetOwner()
or MemPtrSetOwner
. If you set the owner of this parameter block properly, the system maintains the parameter block and frees it when the second application quits. If you don't set the owner of the parameter block, the system frees the parameter block as soon as the calling application quits, causing unpredictable results.
Compatibility
This function is provided for compatibility purposes only. Applications should use SysUIAppSwitch()
instead.
See Also
SysAppLaunch()
, Chapter 2, "Application Start and Stop,"