第三方COM控件只有一个COM.dll首先我用regams C:\COM.dll /tlb: C:\COM.tlb 在本地注册了此控件
当程序中用Type.GetTypeFromCLSID调用这个dll后
object obj = this.type.InvokeMember(null, BindingFlags.Public |
BindingFlags.Instance | BindingFlags.CreateInstance, null, null, null);
出现exceptionRetrieving the COM class factory for component with CLSID {E8B7804B-5E00-4E2C-A44E-92BC1ED69F7A} failed due to the following error: 80070002.这是怎么回事?
当程序中用Type.GetTypeFromCLSID调用这个dll后
object obj = this.type.InvokeMember(null, BindingFlags.Public |
BindingFlags.Instance | BindingFlags.CreateInstance, null, null, null);
出现exceptionRetrieving the COM class factory for component with CLSID {E8B7804B-5E00-4E2C-A44E-92BC1ED69F7A} failed due to the following error: 80070002.这是怎么回事?
2.确认你要调用的类是有Public的构造函数可以调用的