I have a vb.net application that I need to pass in a late bound object (the class is declared with COM) into a vb6 dll.
When trying to do so I get a Type Mismatch error. If I change the vb6 parameters to a variant the Type Mismatch will go away but I cannot use the object as the intended class (it's a variant and not an object).
Is there a way to pass a COM vb.net class late bound into a vb6 dll?
Here is what a call in the vb6 DLL looks like
Public sub DoMyThing(pobjMyLateBoundDotNetClass as object)
in the vb.net project:
Public Sub CallVB6Routine
Dim objDoSomething AS vb6dll.clsDoSometing
Dim pobjMyLateBoundDotNetClass as clsMyLateBoundDotNetClass
objDoSomething.DoMyThing(pobjMyLateBoundDotNetClass)
End Sub
clsMyLateBoundDotNetClass is a class declared as COM compatible
Also Create Object doesnt seem to work (this is how it used to work when all the apps were in VB6)
PS Yes the VB6 dll will be re-written into vb.net but trying to make a deadline with another feature and do not have time to convert yet.
Thanks!