Solved

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

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
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…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

632 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