Gary,
How do you pass a date in this scenario?
>BTW, just to continue a thread almost no one in the VFP community cares about<g>, CreateBinary() will create a string that can be passed as a safearray of VT_UI1 as in cStr = CreateBinary('123456578'), but cStr cannot be passed BY_REF even using ComArray(oComObject,10). Only by first creating an array as byte and filling it can we pass by reference as some COM servers require for passing data back and forth.
>
>Maybe this obscure info will save someone some grief sometime.
>
>Disclaimer: Since I didn't write the COM data thingy, I don't know exactly what it's doing under the covers, but it seems to work, e.g., passing a date returns VT_DATE, 1234 returns VT_I4, etc.
>
>ComArray(oComObj,10)
>DIMENSION MyArray[5] as BYTE
>MyArray[1] = '1'
>MyArray[2] = '2'
>MyArray[3] = '3'
>MyArray[4] = '4'
>MyArray[5] = '5'
>MyStr = CreateBinary('12345')
>
>oComObj(MyStr) && VT_ARRAY|VT_UI1
>oComObj(@MyStr) && VT_ARRAY|VT_UI1
>oComObj(MyArray) && VT_ARRAY|VT_UI1- still seen as array even w/o the @
>oComObj(@MyArray) && VT_ARRAY|VT_UI1|BY_REF
>
--sb--