| Previous | Next |
| TAPI_E_NOTSUPPORTED | TAPI_E_INVALIDMEDIATYPE |
OLE_E_NOCONNECTION
OLE advisory connection identifier is unknown
OLE_E_NOCONNECTION is HRESULT 2147745796 (0x80040004) from winerror.h. The documented description is “There is no connection for this connection ID” The result belongs to Unadvise or management of an existing OLE advise connection. This HRESULT is most useful when tied to the method and lifecycle phase where the supplied connection cookie does not identify an active advisory connection on this object.
This result means that the supplied connection cookie does not identify an active advisory connection on this object. Preserve the original HRESULT and the state that made this condition true; the severity bit alone does not determine how the caller should handle it.
Where the result appears
- This result can surface in a compound-document containers, embedded or linked objects, OLE activation, advising, caching, conversion, and persistence.
- Map the failure to one concrete operation among IOleObject, IOleLink, IOleCache, IAdviseSink, IPersistStorage, IOleInPlaceObject, monikers, verbs, and client-site callbacks.
- Preserve CLSID, object and client-site identity, storage or moniker, advise cookie, verb, activation state, window generation, and presentation format before releasing or replacing the object that returned this result.
An incident record must distinguish caller, runtime, provider, and backing resource while testing whether the supplied connection cookie does not identify an active advisory connection on this object.
Typical causes and interpretation
The immediate contract boundary is specific: the supplied connection cookie does not identify an active advisory connection on this object. Common cause branches include the following:
- The cookie belongs to another object.
- The connection was already removed.
- Object recreation invalidated the previous connection table.
Confirm the cause branch that explains why the supplied connection cookie does not identify an active advisory connection on this object by using call arguments, object state, metadata, device information, or provider traces.
Correct handling and recovery
The primary recovery is to track cookies per object instance and make disconnect cleanup idempotent without reusing stale identifiers. The failure report should capture the relevant state during Unadvise or management of an existing OLE advise connection so it is clear why the supplied connection cookie does not identify an active advisory connection on this object.
The owner of it must define idempotency, cancellation, attempt limits, and reconciliation for the failed Unadvise or management of an existing OLE advise connection.
Practical scenario
A container reconnects an embedded object after reload but later calls Unadvise with the cookie from the previous instance.
Difference from related HRESULTs
CONNECT_E_NOCONNECTION is the connection-point family equivalent; it belongs to OLE advise management.
Developer and administrator guidance
Broad permission or compatibility changes are inappropriate unless evidence for the supplied connection cookie does not identify an active advisory connection on this object points to that layer.
References
Looking for a different code? Search another status or error code.