Is it possible to marshall a structure from an ActiveX control to
Managed code. I know how to pass an array of floats using a Variant and
SafeArray but can't figure out how to pass a Structure. Thought I would
try to create the following process using VB6 for inspiration --->
Event VBStruct(tmeasure As TMeasurment)
Private Sub ActionBtn_Click()
Dim tmeas As TMeasurment
tmeas.coads = 125
tmeas.Interation = 31.45
'tmeas.Desc = "MARSHALL a Structure"
tmeas.Nbytes = 450
RaiseEvent VBStruct(tmeas)
End Sub
This code actually compiles an registers the control. When you embed
this in a C# Form you see the Event in the property window for the
control. You can also generate an event map for it but it will never
sink the event when you fire it from the control.
Any thoughts out there?
Regards,
Dan