| Previous | Next |
| MK_E_EXCEEDEDDEADLINE | MK_E_UNAVAILABLE |
MK_E_NEEDGENERIC
Moniker needs to be generic
When Windows returns MK_E_NEEDGENERIC—HRESULT 2147746274, 0x800401E2, signed -2147221022—The documented description is “Moniker needs to be generic”. The actionable meaning is the operation requires a generic composite form of the moniker. The surrounding operation is performing composition or reduction where the current specialized moniker cannot represent the requested relationship.
Precise failure point
- Confirm that this result came from performing composition or reduction where the current specialized moniker cannot represent the requested relationship, rather than from cleanup or a wrapper that ran afterward.
Diagnostic evidence
- Log both moniker classes and their display names.
- Inspect ComposeWith and Reduce results before binding.
- Compare fOnlyIfNotGeneric with the operation’s need to create a generic composite.
Resolution path
- Identify the exact object, method, and lifecycle phase involved in performing composition or reduction where the current specialized moniker cannot represent the requested relationship.
Distinct causes
- It can result when a specialized moniker is asked to combine with an incompatible neighbor.
- It can result when the implementation needs generic composition to preserve component order.
- It can result when caller code assumes a class-specific optimization applies to every composite.
Retry policy
Correction. allow creation of a generic composite moniker and continue with its returned identity. Retry condition. Retry after changing composition policy; repeating the same class-specific request cannot satisfy the generic requirement. 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 file moniker is composed with a custom item moniker that has no specialized combination; using the generic composite preserves both components.
Difference from related HRESULTs
MK_E_NOPREFIX concerns comparison between monikers; it concerns representation of their composition.
Developer and administrator guidance
References
Looking for a different code? Search another status or error code.