2
votes

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 party pdf converter cannot be found.

Is there any way I can avoid this?

Many Thanks Ni

3
Kudos to you for even trying to do all that... - Austin Salonen
Try turning on Assembly Binding Logging. It may help you diagnose your problem. Using Fuslogvw.exe is the easiest way to turn it on. - Conrad Frix
How complicated is the VB6 project? Can you ditch it / rewrite it? - RQDQ
actually that is very big project. Problem I am trying to solve is: I have got old very important product in vb6. Now i need to convert HTML pages in PDF. but most of all converters cannot be used with VB. therefore I developed DLL and added to VB6 project. But when I run the project it is trying to find third party pdf converter dll. - Nirali
@Conrad Frix: what do you mean. Sorry I am not getting what you are trying to say. - Nirali

3 Answers

2
votes

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.

0
votes

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

0
votes

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