| Previous | Next |
| STATUS_BUFFER_TOO_SMALL | STATUS_NONCONTINUABLE_EXCEPTION |
STATUS_OBJECT_TYPE_MISMATCH
The name resolved, but the object is not the kind the caller requested
STATUS_OBJECT_TYPE_MISMATCH means that Windows found an object but its type is incompatible with the requested operation. The key distinction from not-found statuses is that lookup succeeded; the operation failed because a file, directory, device, event, section, or other object category was not the expected one.
In file-system code this can appear when a request expects a directory but reaches a regular file, or the inverse. In native object-manager code it can also reveal an incorrect assumption about the namespace object behind a name or handle.
Diagnose the contract, not only the path
- Log the requested operation and expected object type together with the resolved name.
- Record create/open options that require a directory or non-directory object.
- Check whether a reparse, device mapping, or root-handle context changed which object the name reached.
- Do not treat the status as a permissions failure: changing access rights does not turn one object type into another.
References
Looking for a different code? Search another status or error code.
