Platform SDK: Win32 API |
Locks the physical volume.
mov ax, 440Dh ; generic IOCTL mov bh, LockLevel ; see below mov bl, DriveNum ; see below mov ch, DeviceCat ; see below mov cl, 4Bh ; Lock Physical Volume mov dx, Permissions ; see below int 21h jc error_handler
Value | Description |
---|---|
00 - 7Fh | Floppy disk drive (00 for the first floppy drive, 01 for the second, and so on). |
80 - FFh | Hard disk drive (80 for the first hard disk drive, 81 for the second, and so on). |
Value | Description |
---|---|
08h | FAT32, FAT16, or FAT12 drive. |
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later. |
Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.
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 13h, Interrupt 26h, or the Interrupt 21h IOCTL functions. A single physical volume may be divided into more than one logical volume, which is also called a partition. The system automatically takes a logical volume lock on all logical volumes on the specified physical drive. If the application performs disk writes only to a logical drive, Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah) is used instead of this function. Unlock Physical Volume (Interrupt 21h Function 440Dh Minor Code 6Bh) should be called to release the lock.