1
votes

I need to use a existing old project into new project in .net c#

I've done this:

I compiled the project vb6 in ActiveX DLL, next when I try to add the reference in my project in Visual Studio .net, it don't work (it say that not valid assemble).

I looked for this problem in web and I did found some solution and I tried to import the assembly following directions online and this work fine now

Now the new problem is that when I debug my project I get

Additional information: Retrieving the COM class factory for component with CLSID {0008E6DF-E43B-4DA5-ADFC-2A83E0F04E6C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Why? How to solve this?

1
It may need to be registered with the COM system in order for you to use them. You can run regsvr32 myactivex.dll from the command line (in the directory with the control, and with admin privileges) to try and register it. - Ron Beyer

1 Answers

0
votes

You need to install VB6 dlls. If you don't you need to manually install it. Com Dlls are usually (and VB6 always) self installable.

regsvr32 c:\path\dllname.dll

For some dll files (not VB6)

regsvr32 /i "command line parameters" c:\path\dllname.dll