Site icon EfmSoft

What does NTSTATUS 0xC0000054 (STATUS_FILE_LOCK_CONFLICT) mean?

 
Previous Next
STATUS_EA_CORRUPT_ERROR STATUS_LOCK_NOT_GRANTED

STATUS_FILE_LOCK_CONFLICT

STATUS_FILE_LOCK_CONFLICT means that the handle may be valid and the file may have been opened successfully, but the requested read or write touches a byte range that another lock currently protects. It is therefore distinct from a sharing violation, which is decided while opening the handle.

What Windows file locks protect

Windows supports byte-range locks rather than only whole-file locks. With LockFileEx, an exclusive lock prevents other processes from reading or writing the locked range; a shared lock prevents writes to that range. The rest of the file can remain accessible. A conflict can therefore appear only for particular offsets and lengths.

Practical checks

On SMB servers, both STATUS_FILE_LOCK_CONFLICT and STATUS_LOCK_NOT_GRANTED can be reported for incompatible byte-range locking operations. The latter is normally associated with the attempt to obtain a lock, while this status commonly appears when an I/O request conflicts with an existing lock.

See LockFileEx, Locking and Unlocking Byte Ranges in Files, and the NTSTATUS reference.


Looking for a different code? Search another status or error code.

Exit mobile version