Important: The information in this document is obsolete and should not be used for new development.
DILoad
You can use theDILoadprocedure to ensure that the Disk Initialization Manager and its associated dialog box and dialog items are in memory.
PROCEDURE DILoad;DESCRIPTION
TheDILoadprocedure 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
DILoadprocedure when you anticipate that the user will need to format a disk. The Standard File Package automatically callsDILoadwhen you callStandardGetFileorStandardPutFile. If you are writing a utility program that frequently needs to initialize disks, such as a disk-copying program, you might callDILoadat 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 theGetResourcefunction with a resource ID of 2 and a resource type of'PACK'. Then, you need to use theHNoPurgeprocedure to make the package resource unpurgeable.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forDILoadare
Trap macro Selector _Pack2 $0002 SPECIAL CONSIDERATIONS
Because theDILoadprocedure allocates memory, you should not call it at interrupt time.