I have C# assembly that I need to use in VB6. I've had this working on previous machines/OS, but on my current Windows 10 machine I can't get it to work when debugging in VB6/VS6 IDE. Whenever, I hit the line:
Set interop = CreateObject("BTR.Core.Interop.Activator")
I receive an 'ActiveX component can't create object.' error.
If I run the compiled VB6 application, everything works. So it must be a permission problem somewhere regarding the VB6/VS6 IDE.
I've found other posts mentioning to make sure to use 32bit version of regasm and I've tried both regasm
and C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe
to no avail.
Since it works when I run the compiled VB6 application (and since both the application and VB6 application worked on previous machines), I think that proves that all the settings for exposing my C# dll to COM are correct, but I'm happy to dig for more details on that if anyone thinks it is pertinent.
Only suspicious thing I saw was that this post (Late binding run-time error in VB6 when creating an object from a .NET assembly) talks about what should be in the registry after running regasm. All my settings are in the WOW6432NODE key at
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\CLSID\{2942ED53-BBC4-311D-9840-1FE610885592}
.
So not sure if there is some sort of 32/64 bit conflict or what. Any suggestions are appreciated.