GetSharedLibraryYou can use the
GetSharedLibraryfunction to locate and possibly also load an import library into your application's context.
OSErr GetSharedLibrary (Str63 libName, OSType archType, LoadFlags findFlags, ConnectionID *connID, Ptr *mainAddr, Str255 errName);
- The name of an import library.
- The instruction set architecture of the import library. For the PowerPC architecture, use the constant
kPowerPCArch. For the 680x0 architecture, use the constant
- A flag that specifies the operation to perform on the import library. See the description of the
GetDiskFragmentfunction on page 3-19 for the values you can pass in this parameter.
- On exit, the connection ID that identifies the connection to the import library. You can pass this ID to other Code Fragment Manager routines.
- On exit, the main address of the import library. The value returned is specific to the import library itself and is not used by the Code
- On exit, the name of the fragment that could not successfully be loaded. This parameter is meaningful only if the call to
GetSharedLibraryfunction locates the import library named by the
libNameparameter and possibly also loads that import library into your application's context. The actions of
GetSharedLibrarydepend on the action flag you pass in the
kFindLibto get the connection ID of an existing connection to the specified fragment,
kLoadLibto load the specified fragment, or
kLoadNewCopyto load the fragment with a new copy of the fragment's data section.
GetSharedLibraryfunction does not resolve any unresolved imports in your application. In particular, you cannot use it to resolve any weak imports in your
fragNoErr 0 No error paramErr -50 Parameter error fragLibNotFound -2804 Specified fragment not found fragHadUnresolveds -2807 Loaded fragment has unacceptable unresolved symbols fragNoMem -2809 Not enough memory for internal bookkeeping fragNoAddrSpace -2810 Not enough memory in user's address space for section fragObjectInitSeqErr -2812 Order error during user initialization function fragImportTooOld -2813 Import library is too old fragImportTooNew -2814 Import library is too new fragInitLoop -2815 Circularity in required initialization order
-2817 Error connecting to fragment fragUserInitProcErr -2821 Initialization procedure did not return
SEE ALSOSee "Loading Code Fragments" on page 3-10 for more details on the fragment-