Solved

Calling a vb.net dll from a vb6 app

Posted on 2006-11-01
3
357 Views
Last Modified: 2012-05-05
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?
0
Comment
Question by:ZuTrekker
  • 2
3 Comments
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
Comment Utility
Hi ZuTrekker;

I think you will find what you are looking for here.

How to call a Visual Basic .NET or Visual Basic 2005 assembly from Visual Basic 6.0

http://support.microsoft.com/kb/817248

Fernando
0
 

Author Comment

by:ZuTrekker
Comment Utility
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.
0
 

Author Comment

by:ZuTrekker
Comment Utility
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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now