Platform SDK: Win32 API |
Locks the logical volume.
mov ax, 440Dh ; generic IOCTL mov bh, LockLevel ; see below mov bl, DriveNum ; see below mov ch, 08h ; device category (must be 08h) mov cl, 4Ah ; Lock Logical Volume mov dx, Permissions ; see below int 21h jc error
Bit | Meaning |
---|---|
0 | 0 = Write operations are failed (specified when a level 1 lock is obtained). |
0 | 1 = Write operations are allowed (specified when a level 1 lock is obtained). |
1 | 0 = New file mapping are allowed (specified when a level 1 lock is obtained). |
1 | 1 = New file mapping are failed (specified when a level 1 lock is obtained). |
2 | 1 = The volume is locked for formatting (specified when a level 0 lock is obtained for the second time). |
Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.
The volume must be locked before the application performs direct disk write operations by using Interrupt 26h or the IOCTL control functions. Lock Physical Volume (Interrupt 21h Function 440Dh Minor Code 4Bh) is used instead of this function before a call to an Interrupt 13h function. Unlock Logical Volume (Interrupt 21h Function 440Dh Minor Code 6Ah) should be used to release the lock.