Important: The information in this document is obsolete and should not be used for new development.
LaunchApplication
You can use theLaunchApplication
function to launch an application.
FUNCTION LaunchApplication (LaunchParams: LaunchPBPtr): OSErr;
LaunchParams
A pointer to a launch parameter block specifying information about the application to launch.
--> launchBlockID Integer Extended block --> launchEPBLength LongInt Length of following fields --> launchFileFlags Integer Finder flags for the application file --> launchControlFlags LaunchFlags Flags for launch options --> launchAppSpec FSSpecPtr Location of application file to launch <-- launchProcessSN ProcessSerialNumber Process serial number <-- launchPreferredSize LongInt Preferred application partition size <-- launchMinimumSize LongInt Minimum application partition size <-- launchAvailableSize LongInt Maximum available partition size --> launchAppParameters AppParametersPtr High-level event for launched applicationDESCRIPTION
TheLaunchApplication
function launches the application from the specified file and returns the process serial number, preferred partition size, and minimum partition size if the application is successfully launched.Note that if you launch another application without terminating your application, the launched application is not actually executed until you make a subsequent call to
WaitNextEvent
orEventAvail
.Set the
launchContinue
flag in thelaunchControlFlags
field of the launch parameter block if you want your application to continue after the specified application is launched. If you do not set this flag,LaunchApplication
terminates your application after launching the specified application, even if the launch fails.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and registers on entry and exit forLaunchApplication
are
Trap macro _Launch
Registers on entry A0 Pointer to launch parameter block
Registers on exit A0 Pointer to launch parameter block D0 Result code RESULT CODES