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: Operating System Utilities /
Chapter 10 - Package Manager


Using the Package Manager

The Package Manager provides two routines: the InitPack procedure and the InitAllPacks procedure. The InitPack procedure loads one specified package into memory. To specify which package to load, you pass, as a parameter to the InitPack 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 the InitAllPacks 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 the InitDBPack 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 routine StandardGetFile, 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.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996