Passing arrays to ActiveX control (*.ocx)

Urlik

New member
Joined
Jan 9, 2007
Messages
1
Programming Experience
3-5
Passing arrays from vb .NET to ActiveX control (*.ocx)

I have an application written in Visual Basic 6 that uses an ActiveX control written in Visual C++ 6. I'm moving the visual basic 6 application to visual basic .NET (2003). The problem is when I try to pass an array from the visual basic code as a parameter of a function of the control.
In Visual Basic 6 the code is something like this:
VB.NET:
Dim dummy(10) as Long
'...
'some code
'...
myActiveXControl.myFunction(dummy(0))
myFunction expects a reference of the first element of an array of Integers. Passing the first element of the array works fine in visual basic 6.

But if I try the above code in vb .NET, changing the definition of the array for this one (type Long in vb 6 is Integer in vb .NET) :
VB.NET:
Dim dummy(10) as Integer
it does not work:confused:

Any help would be appreciated :)

Thanks in advance
 
Last edited:
Back
Top