PHP调用COM dll函数 [英] PHP Calling COM dll functions

查看:131
本文介绍了PHP调用COM dll函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一个项目要求我通过COM对象调用使用php调用dll:

$ obj =新的COM("SimplAt1Com.SimpleObj")或死亡(无法实例化COM!");

此调用似乎可以正常运行,但是当我尝试使用以下方法从对象中调用函数时:

$ result = $ obj-> put_Name("A");

此调用之后的任何代码都不会运行.

任何人都可以阐明可能导致这种情况的原因吗?

另外,如果有人知道一个已知的好dll,或者该文件具有可以以这种方式从php调用的功能,我将对此非常感兴趣.这样,我至少可以验证服务器是否已针对此类操作正确设置.

谢谢〜AJ

A project of mine requires that I call a dll using php via a COM object call:

$obj = new COM("SimplAt1Com.SimpleObj") or die ( "Unable to instantiate the COM!");

This call seems to work ok but the moment I try to call a function from the object using:

$result = $obj->put_Name("A") ;

none of the code after this call gets run.

Can anyone shed some light on what could cause this?

Also if anyone has a or knows of a known good dll that has functions that can be called from php in this manner I would be very interested in it. That way I could at least verify my server is set up correctly for such an operation.

Thanks, ~AJ

推荐答案

obj = new COM("SimplAt1Com.SimpleObj")或死亡(无法实例化COM!");

此调用似乎可以正常运行,但是当我尝试使用以下方法从对象中调用函数时:

obj = new COM("SimplAt1Com.SimpleObj") or die ( "Unable to instantiate the COM!");

This call seems to work ok but the moment I try to call a function from the object using:


结果=


obj-> put_Name("A");

此调用之后的任何代码都不会运行.

任何人都可以阐明可能导致这种情况的原因吗?

另外,如果有人知道一个已知的好dll,或者该文件具有可以以这种方式从php调用的功能,我将对此非常感兴趣.这样,我至少可以验证服务器是否已针对此类操作正确设置.

谢谢〜AJ
obj->put_Name("A") ;

none of the code after this call gets run.

Can anyone shed some light on what could cause this?

Also if anyone has a or knows of a known good dll that has functions that can be called from php in this manner I would be very interested in it. That way I could at least verify my server is set up correctly for such an operation.

Thanks, ~AJ


这篇关于PHP调用COM dll函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆