c++comatlthrowidispatch

Does the `IDispatch::GetTypeInfo()` interface thow?


I'm trying to find information on if the IDispatch interface throws, specifically if IDispatch::GetTypeInfo() does. IIRC, IDispatch::Invoke() can, but I can't seem to find anything on the subject and the documentation here or here doesn't mention anything about this.


Solution

  • None of the standard COM interfaces will throw. COM was designed to be language agnostic, including languages that don't have exceptions.

    It's entirely possible that the implementation of a COM object might throw, but that's up to the implementation of the object itself. Normally a COM object will indicate an error by returning an error code for its HRESULT.