Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们有一个场景,其中一些 .NET 代码试图访问 COM(实际上是 DCOM)对象的当前实例。
被访问的对象是在 VB6 中开发的。它的当前实例在远程系统上可用,并且似乎可以从 VB6 代码正确访问。
尝试调用Marshal.GetActiveObject,指定类名,会导致抛出 COMException,引用错误 800401E3(操作不可用)。
Marshal.GetActiveObject
在托管该 DCOM 组件的计算机上运行时,相同的 .NET 代码似乎可以正常运行。
谁能建议为什么会生成此 COMException ?
您是否尝试在 dot net 客户端应用程序中使用 [STAThread] 属性?