Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Mac OS Runtime Architectures /
Chapter 9 - CFM-68K Application and Shared Library Structure / CFM-68K Application Structure


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.

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.
The CFM Launch code segment in the 'CODE'6 resource takes the following steps when launching a CFM-68K runtime application.

  1. 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.
  2. 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.
  3. Reads the 'cfrg'0 resource and calls the Code Fragment Manager to select the proper fragment from the 'cfrg'0 entries.
  4. Tells the Code Fragment Manager to prepare the application fragment, along with any necessary import libraries.
  5. Adds code to the ExitToShell routine to perform the necessary CFM clean-up operations when an application quits or aborts.
  6. Calls the application's main entry point.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 MARCH 1997