Important: The information in this document is obsolete and should not be used for new development.
DIZero
To complete the disk-initialization process, you can use theDIZerofunction.
FUNCTION DIZero (drvNum: Integer; volName: Str255): OSErr;
drvNum- The number of the drive containing the disk to be zeroed.
volName- The name of the volume (to be included in the volume information).
DESCRIPTION
On the unmounted volume in the drive specified by the given drive number, theDIZerofunction sets the volume information, the volume bitmap, a file directory, and the desktop database (or desktop file) to the settings corresponding to a volume with no files. This function completes the process of making any files previously on the volume permanently inaccessible. If the operation fails,DIZeroreturns a result code indicating that a low-level disk error occurred. Otherwise, it mounts the volume by calling the File Manager functionPBMountVoland returns that function's result code.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forDIZeroare
Trap macro Selector _Pack2 $000A SPECIAL CONSIDERATIONS
You should not callDIZeroat interrupt time. In system software version 7.0 and later,DIZeroautomatically performs bad block sparing, as described in "Bad Block Sparing," beginning on page 5-7.RESULT CODES