动态连接库文件(dynamic link library dll)使用比较广,vb,delphi等也常用
但是:1,如果只是一个简单的dll,那么在php中无法得到它的返回值
2:如果它含有com服务的话,可以访问它(前提是它履行IDispatch 接口)

解决方案 »

  1.   

    一般来说php不支持dll,php是基于函数的。它不象asp那样是基于组件的,可以用dll。但是php中提供了对com的支持----通过设置在php.in中set com.allow_dcom=true。
    com是什么:
    COM is a technology which allows the reuse of code written in any language (by any language) using a standard calling convention and hiding behind APIs the implementation details such as what machine the Component is stored on and the executable which houses it. It can be thought of as a super Remote Procedure Call (RPC) mechanism with some basic object roots. It separates implementation from interface. 
    简单的说COM就是一种再利用已有代码的技术。它把php和应用程序连接起来。那么在应用程序中是可能存在dll,所以这个时候就可以使用dll,不过前提是履行IDispatch(这个我不会翻译)接口
      

  2.   

    这么说来,用 dl() 载入的 DLL 不是不能有返回值,就是 COM 组件?
    那么,怎么在 PHP 里使用自己写的库里的自己的函数呢?
    (别告诉我写一个 PHP 脚本,我指的是已编译的库)