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

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

    <tfoot id='c7DNT'></tfoot>
    1. <small id='c7DNT'></small><noframes id='c7DNT'>

        将 DLL 与 PHP 一起用于傻瓜

        Using a DLL With PHP for Dummies(将 DLL 与 PHP 一起用于傻瓜)

            <tbody id='A680z'></tbody>
            <tfoot id='A680z'></tfoot>
          1. <small id='A680z'></small><noframes id='A680z'>

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

            • <bdo id='A680z'></bdo><ul id='A680z'></ul>

                <i id='A680z'><tr id='A680z'><dt id='A680z'><q id='A680z'><span id='A680z'><b id='A680z'><form id='A680z'><ins id='A680z'></ins><ul id='A680z'></ul><sub id='A680z'></sub></form><legend id='A680z'></legend><bdo id='A680z'><pre id='A680z'><center id='A680z'></center></pre></bdo></b><th id='A680z'></th></span></q></dt></tr></i><div id='A680z'><tfoot id='A680z'></tfoot><dl id='A680z'><fieldset id='A680z'></fieldset></dl></div>
                  本文介绍了将 DLL 与 PHP 一起用于傻瓜的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个项目需要使用 PHP 访问 DLL.服务器是Windows机器,Apache服务器由XAMPP提供.

                  I have a project that needs to access a DLL with PHP. The server is a Windows machine and the Apache server is provided by XAMPP.

                  我在网上阅读了多个答案,例如

                  I read multiple answers on the web like

                  • 在 PHP 中使用 DLL?
                  • php与dll通信?
                  • 通过php调用dll
                  • 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 的方式:

                  Here is how I call the DLL in HTA / Javascript:

                  <object style="display:none" id="SOME_ID" classid="clsid:SOME_CLASS_ID" codebase="./somePath.dll"></object>

                  有人有工作示例吗?

                  这是我迄今为止在 PHP 中尝试过的:

                  Here is what I tried so far in PHP:

                  $obj = new COM('pathTo.dll');
                  

                  DLL 信息:

                  1. 使用 Delphi 编译
                  2. 它(当然)是自制的
                  3. 当我尝试使用 regsvr32
                  4. 注册 DLL 时,我收到以下错误 找不到 DllRegister 服务器入口点

                  不用regsvr32注册就可以使用吗?

                  Can it be used without registering it with regsvr32?

                  推荐答案

                  创建 DLL 文件时,需要使用 模块定义文件.它将包含与此类似的内容:

                  When you create your DLL file, you need to use a module definition file. It will contain something similar to this:

                  ;
                  ;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 入口点.

                  That definition allows regsvr32 to find the DllRegisterServer entry point.

                  您可以尝试的另一个选项是将/n 标志传递给 regsvr32.

                  Another option you can try is to pass the /n flag to regsvr32.

                  Regsvr32 [/u] [/n] [/i[:cmdline]] dllname

                  Regsvr32 [/u] [/n] [/i[:cmdline]] dllname

                  /u - 注销服务器

                  /i - 调用 DllInstall 并传递一个可选的 [cmdline];与/u 一起使用时调用 dll 卸载

                  /i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall

                  /n - 不调用 DllRegisterServer;此选项必须与/i 一起使用

                  /n - do not call DllRegisterServer; this option must be used with /i

                  /s – 静音;不显示消息框(随 Windows XP 和 Windows Vista 添加)

                  /s – Silent; display no message boxes (added with Windows XP and Windows Vista)

                  最终,在您尝试使 DLL 与 PHP 一起工作之前,您需要确保您的 DLL 能够正常工作.

                  Ultimately, before you try to make a DLL work with PHP, you need to be sure your DLL works in general.

                  这篇关于将 DLL 与 PHP 一起用于傻瓜的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                      <tbody id='R0VJi'></tbody>

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

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

                        <tfoot id='R0VJi'></tfoot>
                          • <legend id='R0VJi'><style id='R0VJi'><dir id='R0VJi'><q id='R0VJi'></q></dir></style></legend>