<tfoot id='Ba1X5'></tfoot>

  • <small id='Ba1X5'></small><noframes id='Ba1X5'>

    1. <legend id='Ba1X5'><style id='Ba1X5'><dir id='Ba1X5'><q id='Ba1X5'></q></dir></style></legend>

        <bdo id='Ba1X5'></bdo><ul id='Ba1X5'></ul>

        <i id='Ba1X5'><tr id='Ba1X5'><dt id='Ba1X5'><q id='Ba1X5'><span id='Ba1X5'><b id='Ba1X5'><form id='Ba1X5'><ins id='Ba1X5'></ins><ul id='Ba1X5'></ul><sub id='Ba1X5'></sub></form><legend id='Ba1X5'></legend><bdo id='Ba1X5'><pre id='Ba1X5'><center id='Ba1X5'></center></pre></bdo></b><th id='Ba1X5'></th></span></q></dt></tr></i><div id='Ba1X5'><tfoot id='Ba1X5'></tfoot><dl id='Ba1X5'><fieldset id='Ba1X5'></fieldset></dl></div>

        如何将 8209 数组对象变量转换为 VT_VARIANT

        How to convert 8209 array object variant to VT_VARIANT(如何将 8209 数组对象变量转换为 VT_VARIANT)
          <tbody id='zIh7L'></tbody>
        <legend id='zIh7L'><style id='zIh7L'><dir id='zIh7L'><q id='zIh7L'></q></dir></style></legend>
              <bdo id='zIh7L'></bdo><ul id='zIh7L'></ul>
              <tfoot id='zIh7L'></tfoot>

              1. <small id='zIh7L'></small><noframes id='zIh7L'>

              2. <i id='zIh7L'><tr id='zIh7L'><dt id='zIh7L'><q id='zIh7L'><span id='zIh7L'><b id='zIh7L'><form id='zIh7L'><ins id='zIh7L'></ins><ul id='zIh7L'></ul><sub id='zIh7L'></sub></form><legend id='zIh7L'></legend><bdo id='zIh7L'><pre id='zIh7L'><center id='zIh7L'></center></pre></bdo></b><th id='zIh7L'></th></span></q></dt></tr></i><div id='zIh7L'><tfoot id='zIh7L'></tfoot><dl id='zIh7L'><fieldset id='zIh7L'></fieldset></dl></div>

                1. 本文介绍了如何将 8209 数组对象变量转换为 VT_VARIANT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在调用一个 COM 对象方法,该方法在我的 PHP 代码中返回类型为 8209 的数组变体对象.

                  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
                  

                  我希望最终将转换后的 VT_VARIANT 对象作为另一个 COM 对象方法的值传递,该方法要求其输入为 VT_VARIANT[12].

                  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].

                  我通过发出以下命令将 $com_VArray 转换为 VT_VARIANT 对象变体类型

                  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);
                  

                  然后我收到以下错误

                  致命错误:未捕获的异常 'com_exception' 带有消息变体类型转换失败:类型不匹配."在 C:xampphtdocswaterCompany eservoir.php:110 堆栈跟踪 #0 C:xampphtdocswaterCompany eservoir.php(110): variant_cast(Object(variant),12)#1{main} 抛出在第 110 行的 C:xampphtdocswaterCompany eservoir.php 中.

                  Fatal error: Uncaught exception 'com_exception' with message 'Variant type conversion failed: Type mismatch.' in C:xampphtdocswaterCompany eservoir.php:110 Stack trace #0 C:xampphtdocswaterCompany eservoir.php(110): variant_cast(Object(variant),12)#1{main} thrown in C:xampphtdocswaterCompany eservoir.php on line 110.

                  我在这里阅读了有关 variant_cast 的更多信息 http://php.net/manual/en/function.variant-set-type.php 但我没有取得太大进展.

                  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.

                  我使用的是 PHP 5.5.11.

                  I am using PHP 5.5.11.

                  推荐答案

                  8209 是 0x2011,表示 VT_UI1 元素的数组.

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

                  当你想转换它时,你需要创建一个 Variants 数组并将旧类型的每个元素复制到其中.复制内容时,您可以将每个 VT_UI1 元素转换为 VT_VARIANT 类型.

                  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.

                  不允许也永远不允许强制转换数组.试着学习VARIANTs的基础

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

                  这篇关于如何将 8209 数组对象变量转换为 VT_VARIANT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I parse XML containing custom namespaces using SimpleXML?(如何使用 SimpleXML 解析包含自定义命名空间的 XML?)
                  SimpleXML SOAP response Namespace issues(SimpleXML SOAP 响应命名空间问题)
                  Problems with PHP namespaces and built-in classes, how to fix?(PHP 命名空间和内置类的问题,如何解决?)
                  Use php namespace inside function(在函数内部使用 php 命名空间)
                  unexpected #39;use#39; (T_USE) when trying to use composer(尝试使用作曲家时意外的“使用(T_USE))
                  PHP adding custom namespace using autoloader from composer(PHP使用来自作曲家的自动加载器添加自定义命名空间)
                  <tfoot id='MWrN2'></tfoot>
                  • <bdo id='MWrN2'></bdo><ul id='MWrN2'></ul>

                      <legend id='MWrN2'><style id='MWrN2'><dir id='MWrN2'><q id='MWrN2'></q></dir></style></legend>

                        <small id='MWrN2'></small><noframes id='MWrN2'>

                      1. <i id='MWrN2'><tr id='MWrN2'><dt id='MWrN2'><q id='MWrN2'><span id='MWrN2'><b id='MWrN2'><form id='MWrN2'><ins id='MWrN2'></ins><ul id='MWrN2'></ul><sub id='MWrN2'></sub></form><legend id='MWrN2'></legend><bdo id='MWrN2'><pre id='MWrN2'><center id='MWrN2'></center></pre></bdo></b><th id='MWrN2'></th></span></q></dt></tr></i><div id='MWrN2'><tfoot id='MWrN2'></tfoot><dl id='MWrN2'><fieldset id='MWrN2'></fieldset></dl></div>
                            <tbody id='MWrN2'></tbody>