Site icon EfmSoft

What does NTSTATUS 0xC0000043 (STATUS_SHARING_VIOLATION) mean?

 
Previous Next
STATUS_INVALID_PORT_HANDLE STATUS_QUOTA_EXCEEDED

STATUS_SHARING_VIOLATION

STATUS_SHARING_VIOLATION is an open-time conflict, not a generic permissions failure. Windows evaluates both the access requested by the new caller and the sharing flags granted by handles that are already open for the same file, directory, device, or named pipe. The open is rejected when either side does not permit the other side's requested access.

Why an apparently readable file can still fail to open

A handle can allow reading yet deny a second caller's write, rename, or delete request. For example, an application that opens a file without FILE_SHARE_DELETE can prevent another process from deleting or renaming it until that handle is closed. Likewise, a handle opened with a zero sharing mode is exclusive: later opens are incompatible regardless of ordinary file permissions.

How to diagnose the conflict

This status is different from STATUS_FILE_LOCK_CONFLICT: a sharing violation prevents a compatible handle from being opened, while a byte-range lock can block I/O after a handle has already been opened.

See CreateFile, Closing and Deleting Files, and the NTSTATUS reference.


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

Exit mobile version