I've been trying to figure out how to call the following method on a VB6 COM object from .NET and I'm convinced that it is not possible and that it is either a design flaw of COM interop in the .NET Framework or more likely, a bug.
Public Function CreateMiscRepayment(ByRef objMiscRepayment As MiscRepayment) As Variant
' Code that sets objMiscRepayment here
I've documented the problem and my different attempts to get it working on StackOverflow - http://stackoverflow.com/questions/8529313/how-do-i-call-a-vb6-com-object-from-c-sharp-with-dynamic-when-it-has-a-ref-param.
I understand that it might be possible to call this method with early binding and an interop assembly, but I haven't tried. I think that this *should* be able to work via latebinding/IDispatch.
I'm especially disappointed that this doesn't work since .NET 4.0 was supposed to have much better COM interop support than previous version i.e. dynamic keyword.