Solved

Calling a vb.net dll from a vb6 app

Posted on 2006-11-01
3
363 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

696 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