J
John Dolan
Hi all, I need some help here.
I have an ActiveX object that requires me to pass in an array that is
1-based (as opposed to the normal 0-based index). Unfortunately the author
of the ActiveX defines a 1-based array (to be passed to it) ByRef. So as far
as I can tell I need to pass it a 1-based array. I'm new to .NET but I've
done some homework here and I know that the VB 6.0 "Option Base 1" and like
alternatives are no longer supported. I have also gone back to the developer
of the ActiveX object and asked them to write the #$%! object so I could
pass in a 0-based array, but that has gotten me nowhere.
Any tips, hints, advice or solutions will be greatly appreciated. I've
attempted to add an extra row/column to the arrays and a properly bounded
0-based array with no success. Here is some simplified sample code the
author provided so you have an idea what I'm trying to do.
Dim aryHdrParamList(1 To 4)
Dim aryLineParamMatrix(1 To 30, 1 To 5)
aryHdrParamList(1) = "1"
aryHdrParamList(2) = "1"
aryHdrParamList(3) = "2GXCL0000"
aryHdrParamList(4) = "NONE"
aryLineParamMatrix(1, 1) = "0532"
aryLineParamMatrix(1, 2) = Empty
Set objMethod = CreateObject("Server.Service")
Call objMethod.GetInfo(aryHdrParamList, aryLineParamMatrix)
MsgBox aryHdrParamList(1) & " " & aryHdrParamList(2) & " " &
aryHdrParamList(3)
MsgBox aryLineParamMatrix(1, 1) & aryLineParamMatrix(1, 4) & " " &
aryLineParamMatrix(1, 5)
I have an ActiveX object that requires me to pass in an array that is
1-based (as opposed to the normal 0-based index). Unfortunately the author
of the ActiveX defines a 1-based array (to be passed to it) ByRef. So as far
as I can tell I need to pass it a 1-based array. I'm new to .NET but I've
done some homework here and I know that the VB 6.0 "Option Base 1" and like
alternatives are no longer supported. I have also gone back to the developer
of the ActiveX object and asked them to write the #$%! object so I could
pass in a 0-based array, but that has gotten me nowhere.
Any tips, hints, advice or solutions will be greatly appreciated. I've
attempted to add an extra row/column to the arrays and a properly bounded
0-based array with no success. Here is some simplified sample code the
author provided so you have an idea what I'm trying to do.
Dim aryHdrParamList(1 To 4)
Dim aryLineParamMatrix(1 To 30, 1 To 5)
aryHdrParamList(1) = "1"
aryHdrParamList(2) = "1"
aryHdrParamList(3) = "2GXCL0000"
aryHdrParamList(4) = "NONE"
aryLineParamMatrix(1, 1) = "0532"
aryLineParamMatrix(1, 2) = Empty
Set objMethod = CreateObject("Server.Service")
Call objMethod.GetInfo(aryHdrParamList, aryLineParamMatrix)
MsgBox aryHdrParamList(1) & " " & aryHdrParamList(2) & " " &
aryHdrParamList(3)
MsgBox aryLineParamMatrix(1, 1) & aryLineParamMatrix(1, 4) & " " &
aryLineParamMatrix(1, 5)