How can I convert a JavaScript array() to an ATL/COM array?

前端 未结 4 473
情深已故
情深已故 2021-01-14 23:33

How can I convert a JavaScript array() to an ATL/COM array without using VBArray?

What I want to convert is a new Array() to a SAFEARRAY.

4条回答
  •  伪装坚强ぢ
    2021-01-15 00:31

    A javascript array is a VARIANT that contains an IDispatch pointer. The IDispatch implementation has an enumerator method at dispatch id DISPID_NEWENUM . if you use C++, you can also query IEnumVARIANT from the object to access its elements.

提交回复
热议问题