Loading FragmentsThe Code Fragment Manager provides three functions that you can use to load various kinds of fragments:
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
errNameparameter, the name of the fragment that caused the load to fail. Although fragment names are restricted to 63 characters, the
errNameparameter is declared as type
Str255; doing this allows future versions of the Code Fragment Manager to return a more informative message in the