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
Solved

Adding .NET dll as reference to VB6

Posted on 2004-10-05
3
340 Views
Last Modified: 2010-04-23
I have a VB6 program and would like to use methods of a DLL in this program.  But this is .NET DLL.
Can I add a .NET dll as reference to my VB6 program? If yes, can you please guide me how to do it.
Thanks
0
Comment
Question by:Vasi04
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 500 total points
ID: 12235022
Yes you can
When creating the DLL in .NET set the property of the project "Register for COM InterOp" to True
it is a checkbox in the property pages

Then you can access it in VB6 by adding a reference to it as you do with other DLLs

For detailed info see

http://www.buygold.net/v07n04/v07n04.html
0
 

Author Comment

by:Vasi04
ID: 12235189
cool..
After I have referenced .net dll in my vb6, can I use its methods/funtions?
Or do it need to wirte any code within my vb6 to access the functionalities of referenced .net dll
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12245381
You'll need to create an object of the class in the DLL and call the methods of course...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.net Move a class from Solution Items to a project 2 32
VB.NET 1 28
Help with preventing downloading a zip file 10 45
run a stored procedure from vb.net 1 27
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…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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