Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling a VB6 method from a .NET DLL

Tags:

interop

dll

vb6

I have a DLL written in VB 6 and another DLL written in Visual Studio 2005 (VB.NET).

Now I want to invoke the method of the VB DLL from my .NET DLL. What should I do for this? Any thoughts?

like image 561
Shyju Avatar asked Mar 06 '09 06:03

Shyju


1 Answers

As VB6 creates COM DLLs, Visual Studio should have no problems generating an interop stub for you. Simply add a reference to the VB6 DLL from your .NET project by selecting Add Reference in Visual Studio and finding your DLL under the COM tab. Make sure the VB6 DLL is registered on your machine before you do this.

like image 103
peSHIr Avatar answered Oct 11 '22 08:10

peSHIr