Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC System Software /
Chapter 3 - Code Fragment Manager / Code Fragment Manager Reference
Code Fragment Manager Routines


Loading Fragments

The Code Fragment Manager provides three functions that you can use to load various kinds of fragments: GetDiskFragment, GetMemFragment, and GetSharedLibrary. Loading involves finding the specified fragment, reading it into memory (if it isn't already in memory), and preparing it for execution. The Code Fragment Manager attempts to resolve all symbols imported by the fragment; to do so may involve loading import libraries.

If the fragment loading fails, the Code Fragment Manager returns an error code. Note, however, that the error encountered is not always in the fragment you asked to load. Rather, the error might have occurred while attempting to load an import library that the fragment you want to load depends on. For this reason, the Code Fragment Manager also returns, in the errName parameter, the name of the fragment that caused the load to fail. Although fragment names are restricted to 63 characters, the errName parameter is declared as type Str255; doing this allows future versions of the Code Fragment Manager to return a more informative message in the errName parameter.


Subtopics
GetDiskFragment
GetMemFragment
GetSharedLibrary

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice