Hi have a vb6 project "PROJVB6" with a class "CLASSVB6" with this content:
...
Public Type ActualParametersType_DOCUMENTI
Codice As Variant
Numreg As Variant
End Type
...
Private Gvar_ActualParameters As ActualParametersType_DOCUMENTI
...
Public Property Let ActualParameters(RHS As ActualParametersType_DOCUMENTI)
On Error Resume Next
Gvar_ActualParameters = RHS
End Property
Public Property Get ActualParameters() As ActualParametersType_DOCUMENTI
On Error Resume Next
ActualParameters = Gvar_ActualParameters
End Property
I have another c# project that not references the vb6 project but needs use it. I tried with:
var iet = Type.GetTypeFromProgID("PROJVB6.CLASSVB6");
dynamic CalledProgram = Activator.CreateInstance(iet);
And it works. But if i try to get the property ActualParameters with this:
dynamic a = CalledProgram.ActualParameters();
i receive this error:
The specified record cannot be mapped to a managed value class.
How can i do to access to ActualParameter for set values of Codice or Numreg without generate the error?
Thanks