I have a c# Adapter Assembly around a non-signed third party assembly, so I can't sign my assembly either. My Adapter Assembly is to be used by a VB6 program to access functionality in the third party assembly, which isn't COM. However, while I can register the assembly using regasm, and generate a tlb file, and reference it in VB6, I get an ActiveX exception when I try to Set my Dimmed variable to a new instance of my Adapter.
I have the corresponding .Net frameworks installed, and can run my adapter assembly from the command line via another .Net executable on the machine where VB6 is installed.
Here is how I am setting up my COM, sans Third-Party reference..just in case this is the issue..
[ComVisible(true)]
[Guid("F728D70E-ED98-456C-B8C6-4EA5B0EF8A1A")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("SimpleComClass452.MySimpleComClass")]
public class MySimpleComClass : _MySimpleComClass
{
public int Add(int num1, int num2)
{
return num1 + num2;
}
}
[ComVisible(true)]
[Guid("C729E6FF-C2F5-4C9B-8200-A135E15576A6")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface _MySimpleComClass
{
[DispId(1)]
int Add(int num1, int num2);
}
How can I get to the bottom of the issues with accessing my .NET COM aware Adapter assembly from VB6? I've looked at procmon but can't see anything. Is there any way to ascertain where the problems lie?