Important: The information in this document is obsolete and should not be used for new development.
DILoad
You can use theDILoad
procedure to ensure that the Disk Initialization Manager and its associated dialog box and dialog items are in memory.
PROCEDURE DILoad;DESCRIPTION
TheDILoad
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 callsDILoad
when you callStandardGetFile
orStandardPutFile
. If you are writing a utility program that frequently needs to initialize disks, such as a disk-copying program, you might callDILoad
at the beginning of your application.When you use the low-level disk-initialization routines
DIFormat
,DIVerify
, andDIZero
, 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 theGetResource
function with a resource ID of 2 and a resource type of'PACK'
. Then, you need to use theHNoPurge
procedure to make the package resource unpurgeable.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forDILoad
are
Trap macro Selector _Pack2 $0002 SPECIAL CONSIDERATIONS
Because theDILoad
procedure allocates memory, you should not call it at interrupt time.