IFSMgr_GetLockState( unsigned long Drive, unsigned long * pLockType, unsigned long * pLockFlags, unsigned long * pLockOwner )
This service returns information about volume locks on a given drive.
Drive
Supplies the 0-based drive number to query the volume lock information for.
pLockType
Supplies a pointer to the variable to contain the type of volume lock in effect.
pLockFlags
Supplies a pointer to the variable to contain flags for the volume lock in effect.
pLockOwner
Supplies a pointer to the variable to contain the process id of the process owning the volume lock.
pLockType | Returns the current lock level in effect. The lock level can take on the values listed below. |
Lock Type Values: | |
Value | Meaning |
-1 | This indicates that no lock is currently in effect. |
0 | This indicates that a level 0 lock is currently in effect. |
1 | This indicates that a level 1 lock is currently in effect. |
2 | This indicates that a level 2 lock is currently in effect. |
3 | This indicates that a level 3 lock is currently in effect. |
pLockFlags | Returns flags operative for the current lock level, if any. |
Lock Flag Values: | |
Value | Meaning |
LOCKP_ALLOW_WRITES | Indicates that the volume lock taken allows writes to happen while it is in effect. If this flag is not set and a volume lock is in effect, the volume lock does not allow writes to happen. This flag is not valid for a level 0 lock, it is valid on all other lock levels. |
LOCKP_FAIL_MEM_MAPPING | Indicates that memory-mapping operations cannot be done while the volume lock is effect. If this flag is not set and a volume lock is in effect, memory-mappings are allowed while the volume lock is operative. This flag is not valid for a level 0 lock, it is valid on all other lock levels. |
LOCKP_LOCK_FOR_FORMAT | Indicates that the volume is locked for a format operation. This flag is valid only when the lock level is 0. If this flag is not and a level 0 lock is in effect, the volume is not locked for formatting. |
pLockOwner | Returns the process id of the process owning the lock. Note that this is an internally generated process id and does not refer to any specific data structure. It is purely to be used for identification purposes without any interpretations done on it. |