How to convert 8209 array object variant to VT_VARIANT

前端 未结 1 504
终归单人心
终归单人心 2020-12-20 09:32

I am calling a COM object method that returns an array variant object of type 8209 in my PHP code.

$com_VArray = $com_Object->objectMethod; //Is a 8209 va         


        
相关标签:
1条回答
  • 2020-12-20 09:56

    8209 is 0x2011 that signals an array of VT_UI1 elements.

    When you want to convert it, you need to create an array of Variants and copy each element of the old type into it. When you copy the contents you can cast each VT_UI1 element into an VT_VARIANT type.

    It is not and never allowed to cast arrays. Just try to learn the basisc of VARIANTs

    0 讨论(0)
提交回复
热议问题