Locks or unlocks the volume in the given drive (preventing or permitting its removal) or returns the locked status of the given drive.
mov ax, 440Dh ; generic IOCTL
mov bx, DriveNum ; see below
mov ch, 8 ; device category
mov cl, 48h ; Lock or Unlock Removable Media
mov dx, seg ParamBlock ; see below
mov ds, dx
mov dx, offset ParamBlock
int 21h
jc error
Clears the carry flag and copies the number of pending locks on the given drive to the NumLocks member of the PARAMBLOCK structure if successful. Otherwise, the function sets the carry flag and sets the AX register to one of the following error values:
01h | The function is not supported. |
B0h | The volume is not locked in the drive. |
B2h | The volume is not removable. |
B4h | The lock count has been exceeded. |