Jump to content

DSK_GETLOCKSTATUS

From EDM2


Category
IOCTL_DISK (08h)
Function
DSK_GETLOCKSTATUS (66h)
Description
Status

Description

The output of this function indicates if the drive is locked with or without media in it.

Parameter Packet Format

Parameter Packet
Field Length C Datatype
Command Information BYTE UCHAR
Drive Unit WORD USHORT

Status

  • Bits 0-1 Value:
 * 00: Lock/Unlock/Eject/Status functions not supported.
 * 01: Drive locked. Lock/Unlock/Eject functions supported.
 * 10: Drive unlocked. Lock/Unlock/Eject functions supported.
 * 11: Lock Status not supported. Lock/Unlock/Eject functions supported.
  • Bit 2 Value:
 * 0: No media in drive
 * 1: Media in drive
  • Bits 3-31: Reserved

Data Packet Format

Data Packet
Field Length C Datatype
Status WORD USHORT

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

None