[Windows 95 only.]
Polls the state of the access flag on a volume to determine if a write operation (for example, deleting or renaming a file or writing to a file) or a new file mapping has occurred since the last poll.
mov ax, 440Dh ; generic IOCTL
mov bl, DriveNum ; see below
mov ch, DeviceCat ; see below
mov cl, 6Ch ; Get Lock Flag State
int 21h
jc error_handler
mov [AccessFlag], ax ; state of access flag
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.
Clears the carry flag and sets the AX register to one of the following values if successful:
0 | No write operations or file mappings have occurred since the last poll. |
1 | A write operation has occurred since the last poll (clears the volume access flag). |
2 | A file mapping has occurred since the last poll, or a 32-bit Windows-based DLL or executable has been opened (clears the volume access flag). |
Otherwise, the function sets the carry flag and sets the AX register to an error value.
Only the current lock owner may poll the access flag. The system fails other processes with ERROR_ACCESS_DENIED error value. Write operations performed by the lock owner do not cause a change in the state of the access flag.
When a lock is obtained that allows write operations or new file mappings, the system sets a flag whenever one of these operations happens on the volume. If a write operation or new file mapping has occurred since the last poll, Get Lock Flag State returns 1 or 2 respectively in the AX register and clears the volume access flag. If the swap file has grown or shrunk since the last poll, Get Lock Flag State returns 1. Note that write operations to the swap file that do not cause a change in size do not cause a change in the state of the access flag. If a 32-bit Windows-based DLL or executable has been opened since the last poll, Get Lock Flag State returns 2.