DSK_BLOCKREMOVABLE
Appearance
- Category
- IOCTL_DISK (08h)
- Function
- DSK_BLOCKREMOVABLE (20h)
- Description
- Block Removable
Description
This function is used to determine if the media is removable or fixed.
Parameter Packet Format
Field | Length | C Datatype |
---|---|---|
Command Information | BYTE | UCHAR |
Drive Unit | BYTE | UCHAR |
Data Packet Format
Field | Length | C Datatype |
---|---|---|
Data | 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 can be issued without a previously allocated file handle by using a file handle of -1 and specifying the Drive Unit (0 = A, 1 = B, 2 = C, and so forth). On return, the data byte is set to 0 for removable media or 1 for nonremovable media. Media in the drive is not required for this function.