Error Connecting to Third Party App via COM: mscor

2019-07-12 10:15发布

问题:

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 ...



标签: c# .net com