DSK_BEGINFORMAT
- Category
- IOCTL_DISK (08h)
- Function
- DSK_BEGINFORMAT (04h)
- Description
- Begin Format
Description
This function begins the format process by attaching (mounting) a specified File System Driver (FSD) to a logical disk volume.
Parameter Packet Format
Field | Length | C Datatype |
---|---|---|
FSD Name | ASCIIZ string | PSZ |
Data Packet Format
Field | Length | C Datatype |
---|---|---|
Command Information | BYTE | UCHAR |
Returns
Possible values are shown in the following list:
Code | Description |
---|---|
0 | NO_ERROR |
1 | ERROR_INVALID_FUNCTION |
6 | ERROR_INVALID_HANDLE |
15 | ERROR_INVALID_DRIVE |
31 | ERROR_GEN_FAILURE |
87 | ERROR_INVALID_PARAMETER |
111 | ERROR_BUFFER_OVERFLOW |
115 | ERROR_PROTECTION_VIOLATION |
117 | ERROR_INVALID_CATEGORY |
119 | ERROR_BAD_DRIVER_LEVEL |
163 | ERROR_UNCERTAIN_MEDIA |
165 | ERROR_MONITORS_NOT_SUPPORTED |
Remarks
This function is typically used to force mount the FSD that is formatting a volume and is called before starting a format operation on a volume. It unmounts the current FSD (if any) and forces a mount to the specified FSD. The file system driver name (that is, the name the FSD exports) is specified, with a zero-length string indicating the FAT file system. A flag is set in the OS/2 kernel to indicate that a Begin Format (unmount/mount) was done. DSK_REDETERMINEMEDIA clears this flag, so Function 02h must be performed before the disk is closed with DosClose. The volume is then ready for normal I/O service from the newly mounted FSD.