i found some definition in "wtypes.h"
VT_PTR = 26,
VT_SAFEARRAY = 27,
VT_CARRAY = 28,
VT_USERDEFINED = 29,
VT_LPSTR = 30,
VT_LPWSTR = 31,
* VT_PTR [T] pointer type
* VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)
* VT_CARRAY [T] C style array
* VT_USERDEFINED [T] user defined type
* VT_LPSTR [T][P] null terminated string
* VT_LPWSTR [T][P] wide null terminated string
In my opinion,this definition show that a Variant can as a c array,ptr or c point. but can't get the type of arg when i use follow code to pass c array to javascript
STDMETHODIMP CFileSystemObject::Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr ){
pVarResult->vt = VT_CARRAY|VT_I4;
pVarResult->pintVal = new int[4];
}
how to pass c array to javascript from c++?