When calling Marshal.GetActiveObject( class id here) what would cause error 800401E3 (Operation Unavailable)?

随声附和 提交于 2020-01-05 12:58:06

问题


We have a scenario where some .NET code is attempting to access the current instance of a COM (actually DCOM) object.

The object being accessed was developed in VB6. A current instance of it is available on the remote system, and appears to be accessed correctly from VB6 code.

Attempting to call Marshal.GetActiveObject, specifying the class name, causes a COMException to be thrown, referencing error 800401E3 (Operation Unavailable).

The same .NET code appears to operate correctly when run on the machine hosting that DCOM component.

Can anyone suggest why this COMException is getting generated?


回答1:


Did you try to use the [STAThread] attribute in the dot net client app?



来源:https://stackoverflow.com/questions/1065101/when-calling-marshal-getactiveobject-class-id-here-what-would-cause-error-8004

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