| Previous | Next |
| OLEOBJ_S_INVALIDVERB | OLEOBJ_S_INVALIDHWND |
OLEOBJ_S_CANNOT_DOVERB_NOW
Valid OLE verb cannot run in the current state
OLEOBJ_S_CANNOT_DOVERB_NOW is HRESULT 262529 (0x00040181) from winerror.h. The documented description is “Verb number is valid but verb cannot be done now.” The high-order severity bit is clear, so this is a success result, but it carries more information than plain S_OK.
The verb number is valid for the OLE object, but the object cannot execute it at this time because of activation state, UI ownership, or another temporary condition.
Where the result is encountered
- This result can appear in IOleObject::DoVerb during in-place activation; record the producing interface and method.
- This result can appear in containers switching between open and in-place states; record the producing interface and method.
- It can appear in objects whose server is busy or not ready for the requested UI action; record the producing interface and method.
State to verify
The central question is whether the object class supports the verb and a later state transition can make it executable.
Evidence to preserve
- Preserve verb value and OLEVERB flags.
- Preserve object state before the call.
- Preserve active object and UI window ownership.
- Preserve server process responsiveness.
- Preserve previous activation and deactivation calls.
Correct handling, retry, and recovery
Restore a compatible object and container state, then retry only if the user action is still relevant. Avoid tight loops because the status describes state, not transient transport loss by itself.
Diagnostic sequence
- Capture the raw HRESULT
0x00040181immediately after the returning method and record whether the caller usedSUCCEEDED,FAILED, equality testing, or exception translation. - Verify the method-specific state: the object class supports the verb and a later state transition can make it executable.
Practical validation scenario
A document requests the Open verb while the object is already completing in-place deactivation. It waits for deactivation to finish, revalidates the client site, and invokes the same supported verb once.
Difference from nearby HRESULT values
OLEOBJ_S_INVALIDVERB rejects the verb definition; it accepts the definition but rejects its timing.
Developer and administrator guidance
References
Looking for a different code? Search another status or error code.