| Previous | Next |
| MK_E_NOOBJECT | MK_E_INTERMEDIATEINTERFACENOTSUPPORTED |
MK_E_INVALIDEXTENSION
Bad extension for file
MK_E_INVALIDEXTENSION has hexadecimal value 0x800401E6 (unsigned 2147746278, signed -2147221018). Windows reports “Bad extension for file”. The narrow interpretation is that a file extension is not accepted by the moniker parsing or binding path. The failing stage is creating or resolving a file-oriented moniker that relies on extension-based class information.
API stage
- Confirm that this result came from creating or resolving a file-oriented moniker that relies on extension-based class information, rather than from cleanup or a wrapper that ran afterward.
Verification steps
- Identify the exact object, method, and lifecycle phase involved in creating or resolving a file-oriented moniker that relies on extension-based class information.
- Record the full normalized path and extension separately.
- Inspect file identity/content without executing it.
- Verify the extension-to-class mapping in the effective user and machine context.
Interpretation limits
- It can result when the extension is missing, malformed, or not registered for the intended handler.
- It can result when the name ends with a temporary or misleading extension.
- It can result when the parser applies legacy extension rules that do not cover the actual content.
Incident record
Recovery conditions
Correction. use the correct file name or an explicit class/moniker path that does not depend on misleading extension inference. Retry condition. Retry after correcting the name or registration; never rename arbitrary content solely to bypass validation. Before repeating the operation, release partial monikers and bound interfaces, unregister only owned Running Object Table entries, and abandon a bind context whose deadline or parameters no longer match the retry.
Practical scenario
A link references report.tmp after an atomic-save crash, while the actual document handler expects.doc; restoring the intended name fixes file-moniker resolution.
Difference from related HRESULTs
MK_E_SYNTAX covers general display-name parsing; it narrows the rejection to extension interpretation.
Developer and administrator guidance
References
Looking for a different code? Search another status or error code.