LaunchApplication
specified file and returns the process serial number, preferred partition size,
and minimum partition size if the application is successfully launched.
relevant:
Out-In Name Type Size Offset Description
Æ launchBlockID short Â2 6 extended block
Æ launchEPBLength long Â4 8 length of following fields
Æ launchFileFlags short Â2 12 Finder flags for the application file
Æ launchControlFlags LaunchFlags 2 14 flags for launch options Æ launchAppSpec FSSpecPtr 4 16 location of application file to launch ¨ launchPreferredSize long Â4 28 preferred application partition size
¨ launchMinimumSize long Â4 32 minimum application partition size
¨ launchAvailableSize long Â4 36 maximum available partition size
noErr (0) No error
memFullErr (-108) Not enough memory to allocate the partition size
specified in the 'SIZE' resource
memFragErr (-601) Not enough room to launch application with special
requirements
appModeErr (-602) Memory mode is 32-bit, but application is not 32-bit
clean
appMemFullErr (-605) More memory for the partition size is required than the
amount specified in the 'SIZE' resource
appIsDaemon (-606) Application is background-only, and launch flags do not
allow this
Notes: If you launch another application without terminating your application,
the launched application is not actually executed until you make a
Set the launchContinue flag in the launchControlFlags field of the
the specified application is launched. If you do not set this flag,
specified application, even if the launch fails.
Field descriptions
launchBlockID A value that indicates whether you are using the fields
the constant extendedBlock if you use the fields that
follow it.
launchEPBLength The length of the fields following this field in the
extendedBlockLen to specify this value.
launchFileFlags The Finder flags for the application file. Set the
launchNoFileFlags constant in the launchControlFlags
extract the Finder flags from the application file and to
set the launchFileFlags field for you.
launchControlFlags The launch options that determine how the application
is launched. You can specify these constant values to set
various options:
launchContinue = 0x04000,
launchNoFileFlags = 0x00800,
launchUseMinimum = 0x00400,
launchDontSwitch = 0x00200,
launchInhibitDaemon = 0x00080
See Specifying Launch Options under flags.
launchAppSpec A pointer to a file specification record that gives the
location of the application file to launch.
application if the launch is successful. You can use this
process serial number in other
application.
launchPreferredSize The preferred partition size for the launched
application as specified in the launched application's
0 if an error occurred or if the application is already
open.
launchMinimumSize The minimum partition size for the launched
application as specified in the launched application's
0 if an error occurred or if the application is already
open.
launchAvailableSize The maximum partition size that is available for
allocation. This value is returned to your application
only if the memFullErr result code is returned. If the
application launch fails (because there is not enough
memory), you can use this value to determine if there is
enough memory available to launch in the minimum
size.
launchAppParameters The first high-level event to send to the launched
application. If you specify NIL for this field,
Open Application event to the launched application.