Important: The information in this document is obsolete and should not be used for new development.
The 'CODE' 6 Resource
In MPW, code stored in the'CODE'6
resource handles the launching of CFM-68K runtime applications for the Process Manager in System 7.1.
The
- Note
- The Process Manager in System 7.5 or later can launch CFM-68K runtime applications directly without having to execute routines in the
'CODE'6
resource.CFM Launch
code segment in the'CODE'6
resource takes the following steps when launching a CFM-68K runtime application.
- Checks to see if the computer is a PowerPC-based machine. If so, the
CFM Launch
segment displays the message, "Sorry, this application doesn't run on PowerPC platforms. You may only run it on 68K platforms." If you want to create a custom version of this message, you must install a'STR '
resource with ID -20227 in your CFM-68K runtime application.- Checks to see that the CFM-68K Runtime Enabler is installed on the computer. If the CFM-68K Runtime Enabler is missing, the
CFM Launch
segment displays the message, "This application requires installation of the CFM-68K Runtime Enabler." If you want to create a custom version of this message, you must install a'STR '
resource with ID -20029 in your CFM-68K runtime application.- Reads the
'cfrg'0
resource and calls the Code Fragment Manager to select the proper fragment from the'cfrg'0
entries.- Tells the Code Fragment Manager to prepare the application fragment, along with any necessary import libraries.
- Adds code to the
ExitToShell
routine to perform the necessary CFM clean-up operations when an application quits or aborts.- Calls the application's main entry point.