Error Connecting to Third Party App via COM: mscorlib Exception from HRESULT: 0x80040202

孤者浪人 提交于 2019-12-11 02:42:47

问题


One particular user is getting an exception when connecting an application I created to a third party app using COM. The connection fails with the following error:

Source: mscorlib
Message: Exception from HRESULT: 0x80040202

This software works fine for other users.

Any ideas what could be going on?

The error occurs just before the app adds some event handlers to some of the COM objects from the third party app. It is able to successfully instantiate the objects, though.


回答1:


The error code for that HRESULT is CONNECT_E_CANNOTCONNECT. This is typically returned as a failure code from IConnectionPoint::Advise because the connection point doesn't support the underlying interface.

Can you give us some more context into the code that's causing this exception? Are you creating the component, using it, etc ...



来源:https://stackoverflow.com/questions/1493268/error-connecting-to-third-party-app-via-com-mscorlib-exception-from-hresult-0x

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!