Solved

Calling a vb.net dll from a vb6 app

Posted on 2006-11-01
3
361 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 17851592
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
ID: 17852052
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
ID: 17852146
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 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