我在网上看过多个答案
> Use DLL in PHP?
> php communication with dll?
> calling dll through php
> http://ca.php.net/manual/en/class.com.php
> http://ca2.php.net/manual/en/book.w32api.php
> http://www.talkphp.com/absolute-beginners/3340-php-how-load-com-dll-file.html
这是我如何在HTA / Javascript中调用DLL:
< object style =“display:none”id =“SOME_ID”classid =“clsid:SOME_CLASS_ID”codebase =“./ somePath.dll”>< / object>
有人有工作的例子吗?
这是我迄今为止在PHP中所尝试的:
$obj = new COM('pathTo.dll');
关于DLL的信息:
>使用Delphi编译
这是(当然)自制的
>当我尝试使用regsvr32注册DLL时,我收到以下错误,DllRegister Server入口点未找到
可以使用regsvr32吗?
; ;contains the list of functions that are being exported from this DLL ; DESCRIPTION "Simple COM object" EXPORTS DllGetClassObject PRIVATE DllCanUnloadNow PRIVATE DllRegisterServer PRIVATE DllUnregisterServer PRIVATE
该定义允许regsvr32找到DllRegisterServer入口点.
您可以尝试的另一个选项是将/ n标志传递给regsvr32.
Regsvr32 [/u] [/n] [/i[:cmdline]] dllname
/u – Unregister server
/i – Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n – do not call DllRegisterServer; this option must be used with /i
/s – Silent; display no message Boxes (added with Windows XP and Windows Vista)
最终,在尝试使用PHP进行DLL工作之前,您需要确保DLL的工作原理.