Important: The information in this document is obsolete and should not be used for new development.
Using the Package Manager
The Package Manager provides two routines: the InitPack procedure and theInitAllPacks
procedure. The InitPack procedure loads one specified package into memory. To specify which package to load, you pass, as a parameter to theInitPack
procedure, the package's resource ID. You can use the InitAllPacks procedure to load all packages into memory. Typically, you do not need to use either of these two procedures because theInitAllPacks
procedure is automatically called when your application is launched.The InitPack and
InitAllPacks
procedures do not initialize the packages. Consult the description of the specific package to see if it needs to be initialized before your application can utilize all of its routines. For example, to use the Data Access Manager routines, your application must first call theInitDBPack
function (an initialization routine provided by the Data Access Manager). If a package needs to be initialized, it provides an initialization routine.
- Note
- You can access a routine in a package through a trap macro and a routine selector. The name of the trap macro includes the word "
Pack
" and the resource ID of the specific package. For example, the trap macro for the routines in the Edition Manager is_Pack11
. Most system software routines that are accessed through a trap macro and a routine selector also have a corresponding macro that expands to call the original trap macro and automatically puts the correct routine selector on the stack. For example, to access the Standard File Package routineStandardGetFile
, you can call the_StandardGetFile
macro. The_StandardGetFile
macro then expands to call the_Pack3
trap macro and places the routine selector on the stack (in this example the routine selector is $0006). See the chapter "Trap Manager" in this book for more information about trap macros and routine selectors.