Solved

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

Posted on 2003-12-11
5
1,027 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
difference between String.subString() and String.subSequence() 6 193
constructor while deserilizing object 16 56
method argument as final 1 89
bunnyEars2 challenge 6 129
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

813 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

16 Experts available now in Live!

Get 1:1 Help Now