开发者

.Net DLL referencing another DLL

开发者 https://www.devze.com 2023-04-09 08:14 出处:网络
I have one .Net 4.0 dll project that references third party PDF converter DLL. I have exposed this dll for COM. Now when I am trying to add my .tlb file to VB6 project it comes up with runtime error.

I have one .Net 4.0 dll project that references third party PDF converter DLL. I have exposed this dll for COM. Now when I am trying to add my .tlb file to VB6 project it comes up with runtime error. Error says the dll which is third part开发者_StackOverflow社区y pdf converter cannot be found.

Is there any way I can avoid this?

Many Thanks Ni


Yes, VB6 dates from the days of DLL Hell. There's no good scenario to help the CLR find the DLL in some random directory when the VB6 IDE is in charge. It isn't clear whether the helper DLL is a .NET assembly or a native DLL. Either way, what works best is copying the DLL into the same directory as vb6.exe, c:\program files\microsoft visual studio\vb98 by default. Keeping that copy up to date is your bit of dll hell.


Either GAC the third party dll, or put it in the same path as the registered COM dll


Ok at last it worked. All I did: open up .tlb file in Visual studio and added third party pdf dll using custom library. It started working.. Thanks everyone for help

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号