Solved

Adding .NET dll as reference to VB6

Posted on 2004-10-05
3
335 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

17 Experts available now in Live!

Get 1:1 Help Now