views:

527

answers:

1

I have a VB.net control that has an event:

Public Event PassNames(ByVal names() as String)

When the event triggered in VB6, I get the following error:

"Function or interface marked as restriced, or the function uses an Automation type not supported in Visual Basic"

Here is the event in VB6:

Private Sub IteropControl1_PassNames(ByVal names() As String)
      MsgBox "I don't work"
End Sub

Is there a way to uses arrays with Interop User Controls?

+3  A: 

I figured it out what I was doing wrong.

In my VB.net control, my event should be

Public Event PassNames(ByRef names() as String)

instead of

Public Event PassNames(ByVal names() as String)
Maudite