doucong3048 2016-02-19 08:57
浏览 74

从PHP调用COM方法时如何传递空指针?

There's this method definition in COM server IDL:

[id( 15 )] 
HRESULT RunProcessing(
    [in, defaultvalue( 0 )] IProcessingParams* ProcessingParams,
    [in, defaultvalue( 0 )] IIndicesCollection* Indices );

the COM server is implemented in C++ and proper registered and the typelib created from that IDL is also proper registered.

There's a piece of PHP code that tries to invoke that method and pass "null" as first parameter and a specific object as the second parameter:

$processor->RunProcessing( NULL, $indices );

This yields

Uncaught exception 'com_exception' with message 'Parameter 0: type mismatch'

and refers to the line with RunProcessing().

What's the proper way of having a null pointer passed into a COM object method from PHP code?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 线性代数的问题,我真的忘了线代的知识了
    • ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统
    • ¥188 需要修改一个工具,懂得汇编的人来。
    • ¥15 livecharts wpf piechart 属性
    • ¥20 数学建模,尽量用matlab回答,论文格式
    • ¥15 昨天挂载了一下u盘,然后拔了
    • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
    • ¥20 易康econgnition精度验证
    • ¥15 msix packaging tool打包问题
    • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了