| Previous | Next |
| MK_E_NOSTORAGE | MK_E_ENUMERATION_FAILED |
MK_E_NOPREFIX
No common prefix
Windows defines MK_E_NOPREFIX as 2147746286 (0x800401EE; signed value -2147221010). AllStat’s description is “No common prefix”. The code marks a specific failure: Two monikers have no common prefix under their class-specific comparison rules. The relevant operation is calling IMoniker::CommonPrefixWith for relative naming or link simplification.
The high bit in 0x800401EE is set, so this is a failure rather than a success or informational result. Its facility field is 4 (FACILITY_ITF) and its low 16-bit code is 494 (0x01EE). Those bit fields classify the value, but they do not identify the failing object by themselves; the native method, object identity, and first producer of this result remain essential.
Where it is raised
Understanding this result requires this subsystem context: A moniker is an object with class-specific parsing, comparison, composition, and binding behavior. Display-name text alone does not establish what operations a particular moniker implementation supports.
- Associate this result with one exact operation in IMoniker methods, IBindCtx state, display-name parsing, composite monikers, the Running Object Table, deadlines, and object or storage binding.
- Confirm that this result came from calling IMoniker::CommonPrefixWith for relative naming or link simplification, rather than from cleanup or a wrapper that ran afterward.
- Preserve any IErrorInfo, underlying Win32 result, provider message, or callback failure that preceded it; the HRESULT alone should not erase a more specific cause.
Telemetry checklist
A useful incident records the moniker class, display name with secrets removed, bind options and deadline, pmkToLeft, requested IID, ROT result, file identity, composite components, and object lifetime registrations in IBindCtx. Also retain the application and component build, architecture, process and thread IDs, COM apartment, operation correlation ID, elapsed time, and the first state-changing event before the failure. When logging it, redact content and credentials while preserving types, lengths, hashes, opaque identities, and lifecycle generations needed to reproduce its contract.
- log both moniker classes and canonical display names.
- compare reduced forms before CommonPrefixWith.
- treat the result as a valid comparison outcome rather than corruption.
Why it is specific
- It can result when the monikers refer to unrelated roots, servers, files, or namespaces.
- It can result when different moniker classes cannot establish a shared prefix.
- It can result when normalization differences prevent a prefix that textual comparison appears to show.
Investigation order
- Capture it at the first native return before a wrapper maps it to a generic exception.
- Identify the exact object, method, and lifecycle phase involved in calling IMoniker::CommonPrefixWith for relative naming or link simplification.
- Compare reduced forms before CommonPrefixWith.
- Reproduce it with one controlled input or state change, and verify that the correction changes the decisive evidence rather than merely hiding the result.
Safe handling
Correction. for it, retain absolute monikers or choose another relation strategy; no repair is required when unrelated names are expected. Retry boundary. Do not retry unless one moniker changes or is reduced to a comparable form. 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
Two document links reside on different servers, so no shared file-moniker prefix exists; the application stores both absolute links. This isolates it within COM moniker parsing, composition, binding, and storage resolution and provides a regression test for the stated correction.
Difference from related HRESULTs
MK_E_NEEDGENERIC concerns composition representation; it concerns comparison and may be an expected nonmatch. Keep those outcomes separate in exception mappings, telemetry dimensions, user messages, and automated retry policy.
Developer and administrator guidance
Preserve the concrete moniker class, compose through IMoniker methods rather than string concatenation, set realistic bind deadlines, and request object versus storage interfaces deliberately. Regression coverage for it should include malformed and class-specific display names, absent left-hand context, expired deadlines, unsupported inverse or enumeration operations, unavailable ROT objects, file access, and storage-only targets.
Operational repair for it must target the evidence-backed owner: verify the named resource, file, server, or registration identified by the concrete moniker; do not infer a machine-wide COM fault from one provider-specific display name. Retain before-and-after traces for it so the change can be attributed and reversed.
References
- Microsoft: generic COM error codes
- Microsoft: HRESULT values
- Microsoft: IMoniker
- Microsoft: IBindCtx
- Microsoft: MkParseDisplayName
- Microsoft: IMoniker::CommonPrefixWith
Looking for a different code? Search another status or error code.