2012-04-05 152 views
1

尝试在服务器上创建COM对象。在C#中的服务器上创建COM对象:错误:80070776

代码:

var myGuid = new Guid("530A1815-820C-11D3-BBB7-008048DE406A"); 
var myType = Type.GetTypeFromCLSID(myGuid, some_ip, true); 
ITInfoServer infsrv = (ITInfoServer)Activator.CreateInstance(myType); 
// infsrv.callSomeMethod (....); 

得到的错误:

Creating an instance of the COM component with CLSID {530A1815-820C-11D3-BBB7-008048DE406A} from the IClassFactory failed due to the following error: 80070776.

+1

0x80070776 = OR_INVALID_OXID: “指定的对象导出未找到”。 – Rup 2012-04-05 11:57:46

+0

@Rup,谢谢。 “未找到指定的对象导出程序。” - 这是什么意思? – VextoR 2012-04-05 12:01:40

+2

不是我的专业领域,对不起。 [此MSDN页面](http://msdn.microsoft.com/en-us/library/cc226948.aspx)听起来像一个DCOM错误:也许你的机器正试图远程到另一台机器来获取COM对象,但另一台机器没有配置对象给你吗? – Rup 2012-04-05 12:55:22

回答