DSK_UNLOCKDRIVE
- Category
- IOCTL_DISK (08h)
- Function
- DSK_UNLOCKDRIVE (01h)
- Description
- Unlock Drive.
Description
This function releases a lock on a volume in a drive, thereby allowing I/O from other processes to that volume again. The locked volume represented by the file handle on which this function is issued, must be in the drive. Notice that this function must be called after accessing a drive that was locked with DSK_LOCKDRIVE before closing the drive with DosClose.
Parameter Packet Format
| Field | Length | C Datatype |
|---|---|---|
| Command Information | BYTE | UCHAR |
Command Information
Reserved. Must be set to 0.
Data Packet Format
| Field | Length | C Datatype |
|---|---|---|
| Reserved. Set to 0. | 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 releases a lock on a volume in a drive, thereby allowing I/O from other processes to that volume again. The locked volume represented by the file handle on which this function is issued, must be in the drive.
Notice that this function must be called after accessing a drive that was locked with DSK_LOCKDRIVE before closing the drive with DosClose.