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: PowerPC System Software /


Chapter 3 - Code Fragment Manager

This chapter describes the Code Fragment Manager, the part of the Macintosh system software that loads fragments into memory and prepares them for execution. A fragment can be an application, an import library, a system extension, or any other block of executable code and its associated data.

The Code Fragment Manager is intended to operate transparently to most applications and other software. You need to use the Code Fragment Manager explicitly only if

For example, if your application supports dynamic loading of tools, filters, or other software modules contained in fragments, you'll need to use the Code Fragment Manager to load and prepare them for execution.

This chapter also describes the format of the code fragment resource, which defines information about a fragment. You need to create a code fragment resource (a resource
of type 'cfrg') for each application or import library you create. For information on doing this, see "Creating a Code Fragment Resource" on page 3-12.

To use this chapter, you should already be generally familiar with the Macintosh Operating System. See the books Inside Macintosh: Processes and Inside Macintosh: Memory for information about the run-time architecture of the 680x0 environment. You also need to be familiar with the run-time architecture of PowerPC processor-based Macintosh computers, as explained in the chapter "Introduction to PowerPC System Software." That chapter describes the general nature and structure of fragments.

This chapter begins by describing the capabilities of the Code Fragment Manager. Then it describes how the Code Fragment Manager searches for the appropriate versions of import libraries. In general, you need to know these details about searching and version checking only if you are creating updated versions of an existing import library. The section "Using the Code Fragment Manager" beginning on page 3-10 provides code samples illustrating how to use some of the routines provided by the Code Fragment Manager. The section "Code Fragment Manager Reference" beginning on page 3-15 is a complete reference to the Code Fragment Manager.


Chapter Contents
About the Code Fragment Manager
Fragments
Import Library Searching
Version Checking
Using the Code Fragment Manager
Loading Code Fragments
Creating a Code Fragment Resource
Getting Information About Exported Symbols
Code Fragment Manager Reference
Data Structures
Fragment Initialization Block
Fragment Location Record
Memory Location Record
Disk Location Record
Segment Location Record
Code Fragment Manager Routines
Loading Fragments
Unloading Fragments
Finding Symbols
Fragment-Defined Routines
Resources
The Code Fragment Resource
Summary of the Code Fragment Manager
C Summary
Constants
Data Types
Code Fragment Manager Routines
Fragment-Defined Routines
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996