December 17th, 2012, 08:51 AM
using a VB.NET dll in VB6
I am trying to create a DLL in VB.NET (2012) which I will then use in several existing VB6 applications.
I have already built the DLL but I cannot get VB6 to use it! I created a DLL registered for COM interop, run regasm and pretty much everything else I found on the net, and I ended up with "myClass.dll" and "myClass.tlb".
Going back to VB6 now, I added the tlb to the references (the dll cannot be added it seems). When I run my application, at the point where I try to create a new instance of my main dll class, I get a crash instead... "ActiveX component can't create object"
I remember that this is related to dll's that are not registered, but when I try to register the tlb with regsvr32 I get "myClass.tlb is not an executable file and no registration helper is registered for this file type." and when I try to register the dll I get "myClass.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered.".
What am I missing? is it correct that I need both files (dll & tlb) and that I need to reference the tlb and register the dll?
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!