have some C++ component that expects two arrays from an ASP script. It's
declared like this:

HRESULT QueryResult::sort(TVariant sortFields, TVariant sortMethod)

To test if the array is created from JScript I use
if ((sortFields.vt & VT_TYPEMASK) == VT_DISPATCH) //is a jscript array

and to test if it's called from VBScript I use
if (sortFields.vt & VT_ARRAY) //VBScript array

But is doesn't work from a VBScript asp page.

When I do the following:

Dim arrSFlags(4)

arrSFlags(0) = False
arrSFlags(1) = False
arrSFlags(2) = True
arrSFlags(3) = False

queryresult.sort arrSFields, arrSFlags

The arrays are not recognized (where vt is tested for VT_ARRAY)
This has been tested in the past and seemed to work, does somebody know the
correct way to retrieve arrays from VBScript?

I tested this under windows2000 SP4