| Previous | Next |
| MK_S_US | EVENT_S_SOME_SUBSCRIBERS_FAILED |
MK_S_MONIKERALREADYREGISTERED
Moniker is already in the Running Object Table
MK_S_MONIKERALREADYREGISTERED is HRESULT 262631 (0x000401E7) from winerror.h. The documented description is “Moniker is already registered in running object table.” The high-order severity bit is clear, so this is a success result, but it carries more information than plain S_OK.
Registration completed with information that the moniker was already registered in the Running Object Table.
Where the result is encountered
- This result can appear in IRunningObjectTable::Register; record the producing interface and method.
- This result can appear in OLE servers exposing running documents; record the producing interface and method.
- It can appear in containers refreshing active-object registration; record the producing interface and method.
Diagnostic sequence
- Capture the raw HRESULT
0x000401E7immediately after the returning method and record whether the caller usedSUCCEEDED,FAILED, equality testing, or exception translation. - Verify the method-specific state: the existing ROT entry belongs to the intended object instance and registration flags rather than a stale or competing server.
State to verify
The central question is whether the existing ROT entry belongs to the intended object instance and registration flags rather than a stale or competing server.
Correct handling, retry, and recovery
Reuse or deliberately replace the existing registration according to ownership. Do not leave duplicate logical registrations or revoke a cookie owned by another instance.
Evidence to preserve
- Preserve moniker display name.
- Preserve existing and requested registration cookie.
- Preserve server process and object identity.
- Preserve ROT flags.
- Preserve last-change time and revocation history.
Difference from nearby HRESULT values
MK_E_UNAVAILABLE indicates no running object can be obtained; it indicates an entry already exists.
Developer and administrator guidance
Practical validation scenario
A document server recovers after a UI restart and tries to register the same document moniker. It verifies the ROT entry points to itself, retains the correct cookie, and avoids publishing a second instance.
References
Looking for a different code? Search another status or error code.