Solved

How can I use a VB.net Dll in VB6?

Posted on 2003-12-11
5
1,024 Views
Last Modified: 2012-05-04
I have written a dll with VB.NET, But I wanna use it in VB6.
how can i do ? My English is not good enough, please don't mind. Thanks a lot.
0
Comment
Question by:ryustar
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:nishikanth
ID: 9926485
It's quite simple but you will end up with 2 dlls(COM referencer, .Net DLL)
Use the Run command in the Start Menu:


Code:
--------------------------------------------------------------------------------
"C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\tlbimp.exe" "C:\MyProject\Bin\MyProject.dll"

--------------------------------------------------------------------------------


This will create MyProject.tlb which can be used in VB 5/6 and any other COM enabled languages(Note the .Net framework is still required to use the dll)
0
 

Author Comment

by:ryustar
ID: 9926664
But , when I do as your said. This error occurs. can you tell me why?

"TlbImp error: The input file 'E:\My Project\VB.net\DllTeset\bin\DllTeset.dll' is not a valid type library"
0
 
LVL 8

Accepted Solution

by:
nishikanth earned 20 total points
ID: 9927290
it's ok, i found what it was "tlbexp.exe" not "tlbimp.exe"  cheers
0
 

Author Comment

by:ryustar
ID: 9927451
thanks for your help, nishikanth,  I have resolved that problem.
this is my first question in this forum. sincerely send my thanks to you.
0
 
LVL 8

Expert Comment

by:nishikanth
ID: 9934668
my pleasure. But you gave a B grade inspite the problem was resolved (:
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

746 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

8 Experts available now in Live!

Get 1:1 Help Now