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: Files /
Chapter 5 - Disk Initialization Manager / Disk Initialization Manager Reference
Routines / Loading and Unloading the Disk Initialization Manager


DILoad

You can use the DILoad procedure to ensure that the Disk Initialization Manager and its associated dialog box and dialog items are in memory.

PROCEDURE DILoad;
DESCRIPTION
The DILoad procedure reads the Disk Initialization Manager and its associated dialog box and dialog items into memory and makes them unpurgeable. Depending on which Macintosh model the user is using, the Disk Initialization Manager and the dialog box and dialog items are either in ROM or in the System file.

Ordinarily, you call the DILoad procedure when you anticipate that the user will need to format a disk. The Standard File Package automatically calls DILoad when you call StandardGetFile or StandardPutFile. If you are writing a utility program that frequently needs to initialize disks, such as a disk-copying program, you might call DILoad at the beginning of your application.

When you use the low-level disk-initialization routines DIFormat, DIVerify, and DIZero, the Disk Initialization Manager does not need to load a dialog box. Therefore,
if you use only these routines, you can (if you wish) call the Resource Manager to read just the package resource into memory and the Memory Manager procedure to make
it unpurgeable. To read just the package resource into memory, you can call the GetResource function with a resource ID of 2 and a resource type of 'PACK'. Then, you need to use the HNoPurge procedure to make the package resource unpurgeable.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for DILoad are
Trap macroSelector
_Pack2$0002

SPECIAL CONSIDERATIONS
Because the DILoad procedure allocates memory, you should not call it at interrupt time.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996