| Previous | Next |
| ERROR_DEVICE_SUPPORT_IN_PROGRESS | ERROR_ATOMIC_LOCKS_NOT_SUPPORTED |
ERROR_CANCEL_VIOLATION
The requested lock cancellation has no matching operation
ERROR_CANCEL_VIOLATION is a Win32 result associated with file-region locking and cancellation.
What the result means
A cancel request did not match an outstanding lock operation for the supplied region.
What to check
- Verify that the offset and length exactly match the outstanding lock request.
- Track whether the lock completed, timed out, or was already canceled on another thread.
- Review asynchronous cleanup paths for duplicate cancellation.
- Log the file identity, overlapped structure, byte range, and owner thread.
Recommended handling
Correct the lock lifecycle instead of ignoring this result. Cancellation should be issued once, against the same operation object and range that was originally submitted.
References
Looking for a different code? Search another status or error code.