Matt Heffron
April 20th, 1999, 06:00 PM
Assuming that I've missed some documentation, it seems that VB passes the dimension info for multidimension SAFEARRAYs with the indices in reverse order from what is documented.
E.g. passing an array dimensioned as:
Dim Foo(0 to 3, 0 to 5) as Single
When the COM object's method gets the SAFEARRAY, it's .rgsabound[] entries are setup with
.rgsabound[0].cElements == 6
and
.rgsabound[1].cElements == 4
This seems to be backwards from the order implied by the documentation which states:
"The array rgsabound is stored with the left-most dimension in rgsabound[0] and the right-most dimension in rgsabound[cDims – 1]."
What am I missing?
E.g. passing an array dimensioned as:
Dim Foo(0 to 3, 0 to 5) as Single
When the COM object's method gets the SAFEARRAY, it's .rgsabound[] entries are setup with
.rgsabound[0].cElements == 6
and
.rgsabound[1].cElements == 4
This seems to be backwards from the order implied by the documentation which states:
"The array rgsabound is stored with the left-most dimension in rgsabound[0] and the right-most dimension in rgsabound[cDims – 1]."
What am I missing?