COM.Mydll.tlb文件无法加载它引用的程序集 [英] COM.Mydll.tlb file not able to load assembly which it refers

查看:63
本文介绍了COM.Mydll.tlb文件无法加载它引用的程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在app(VC ++)中导入com.Mydl.tlb时,我的com.Mydll.tlb文件引用了otherdll.dll build,com.Mydll.tlh头文件生成成功。



但是当我尝试创建实例时



HRESULT错误REGDB_E_CLASSNOTREG类未注册即将到来。



当我向GAC注册otherdll.dll时,此错误消失了,但是我无法访问otherdll.dll方法。



我试图将两个dll保存在同一个工作目录中,试图动态加载otherdll.dll。仍然存在问题。



尝试使用regasm注册otherdll.dll,但它也没有帮助。如果有人能提出建议,那将非常有帮助。

My "com.Mydll.tlb" file is having reference to "otherdll.dll" when I am importing com.Mydl.tlb in app(VC++) and build, com.Mydll.tlh header file generated successfully.

but when I am trying to create instance

"HRESULT error REGDB_E_CLASSNOTREG Class not registered is coming."

when I registered otherdll.dll to GAC this error was gone, but I was not able to access otherdll.dll methods.

I have tried to keep both dll's in same working directory, tried to load otherdll.dll dynamically. still problem persists.

Tried to register otherdll.dll using regasm, but it was also not helpful. It will be really helpful if anyone can suggest something..

推荐答案

查看过去的答案:类未注册(HRESULT异常:0x80040154(REGDB_E_CLASSNOTREG)) [ ^ ]



根据我的经验,您需要在GAC中注册两个dll,或者至少通过regsrv32.exe注册otherdll.dll。
See past answers: "Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"[^]

As per my experience, you need to register both dlls in GAC or - at least - otherdll.dll via regsrv32.exe.


这篇关于COM.Mydll.tlb文件无法加载它引用的程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆