Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want to use a VB.NET dll in a VB6 program. Is it possible?

Tags:

vb.net

dll

vb6

I am having problems when using a VB.NET dll in a VB6 program. I have already created my dll with the GuidAttribute, used the RegAsm to create a tlb and added it to the references of my VB6 program. The problem is when I try to create the object using CreateObject function, however the following error shows up "ActiveX component can't create object."

I don't know if I am missing any declaration on VB.NET to use it as a dll or if I am not using the CreateObject function properly.

like image 776
jpnavarini Avatar asked Nov 06 '22 16:11

jpnavarini


1 Answers

A complete article about Calling .Net Classes from Visual Basic 6: http://www.devsource.com/c/a/Using-VS/Calling-Net-Classes-from-Visual-Basic-6/

Creating a COM DLL with VS 2005: A walk through: http://www.codeproject.com/KB/COM/VS2005ComDllWalkThru.aspx

like image 68
mangokun Avatar answered Nov 15 '22 05:11

mangokun