Link to home
Start Free TrialLog in
Avatar of ZuTrekker
ZuTrekker

asked on

Calling a vb.net dll from a vb6 app

We have a legacy vb6 application and want to expand iots functionality by creating a dll "ITS32.dll" in vb.net and calling it from vb6. I created a .net controlLibrary project and built a beginning dll. I ran it through tlbexp.exe, registered it with regasm.exe, and copied both the ITS32.tlb and ITS32.dll files to the System32 folder. I tried to add the dll to the vb6 project references but it would only accept the tlb. I created a declare statement in the vb6 project to identify the dll sub routine "createForm." My vb6 project has just a command button to call the dll sub. I get an error "Can't find dll entry point createForm in ITS32."

What advice do you have for me?
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ZuTrekker
ZuTrekker

ASKER

Well, that kb was very helpful. I copied the example exactly and now get an error message "Cannot create a file when that file already exists." That comes up on the "Set myObject = New TestProj.COMClass1" statement.
OK, I got past that. Now I get the same message on the line that reads "MsgBox myObject.myFunction" which seems weird because myFunction appears when the period is pressed.