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 variant object
I want in the end to pass the converted VT_VARIANT object as a value for another COM object method which requires its input to be VT_VARIANT[12].
I am converting $com_VArray to a VT_VARIANT object variant type by issuing the following
$obj_VT_VARIANT = variant_cast($com_VArray, VT_VARIANT);
But then I get this following error
Fatal error: Uncaught exception 'com_exception' with message 'Variant type conversion failed: Type mismatch.' in C:\xampp\htdocs\waterCompany\reservoir.php:110 Stack trace #0 C:\xampp\htdocs\waterCompany\reservoir.php(110): variant_cast(Object(variant),12)#1{main} thrown in C:\xampp\htdocs\waterCompany\reservoir.php on line 110.
I have done some more reading on variant_cast here http://php.net/manual/en/function.variant-set-type.php but I have not made much significant headways.
I am using PHP 5.5.11.