pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

      <tfoot id='8uCr7'></tfoot>

        <small id='8uCr7'></small><noframes id='8uCr7'>

      1. <i id='8uCr7'><tr id='8uCr7'><dt id='8uCr7'><q id='8uCr7'><span id='8uCr7'><b id='8uCr7'><form id='8uCr7'><ins id='8uCr7'></ins><ul id='8uCr7'></ul><sub id='8uCr7'></sub></form><legend id='8uCr7'></legend><bdo id='8uCr7'><pre id='8uCr7'><center id='8uCr7'></center></pre></bdo></b><th id='8uCr7'></th></span></q></dt></tr></i><div class="cqge48s" id='8uCr7'><tfoot id='8uCr7'></tfoot><dl id='8uCr7'><fieldset id='8uCr7'></fieldset></dl></div>
          <bdo id='8uCr7'></bdo><ul id='8uCr7'></ul>

      2. <legend id='8uCr7'><style id='8uCr7'><dir id='8uCr7'><q id='8uCr7'></q></dir></style></legend>
      3. 使用 Com4j 或 Jacob 連接 64 位 Java 和 32 位 COM dll

        Connect 64bit Java with 32bit COM dll using Com4j or Jacob(使用 Com4j 或 Jacob 連接 64 位 Java 和 32 位 COM dll)
          • <bdo id='COmc2'></bdo><ul id='COmc2'></ul>

            • <small id='COmc2'></small><noframes id='COmc2'>

                <tbody id='COmc2'></tbody>
              <legend id='COmc2'><style id='COmc2'><dir id='COmc2'><q id='COmc2'></q></dir></style></legend>
                <tfoot id='COmc2'></tfoot>
                <i id='COmc2'><tr id='COmc2'><dt id='COmc2'><q id='COmc2'><span id='COmc2'><b id='COmc2'><form id='COmc2'><ins id='COmc2'></ins><ul id='COmc2'></ul><sub id='COmc2'></sub></form><legend id='COmc2'></legend><bdo id='COmc2'><pre id='COmc2'><center id='COmc2'></center></pre></bdo></b><th id='COmc2'></th></span></q></dt></tr></i><div class="yrqp2yo" id='COmc2'><tfoot id='COmc2'></tfoot><dl id='COmc2'><fieldset id='COmc2'></fieldset></dl></div>

                  本文介紹了使用 Com4j 或 Jacob 連接 64 位 Java 和 32 位 COM dll的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我有以下配置:

                  1) Windows 10 64 位

                  1) Windows 10 64-bit

                  2) 只有 32 位版本且可通過 COM 獲得的應(yīng)用程序.

                  2) An application that has only a 32-bit version and is available through COM.

                  我使用 tlbimb.jar 訪問 32 位應(yīng)用程序的 .dll 文件以生成所需的接口,我成功了.

                  I access the .dll file of the 32-bit application using the tlbimb.jar to generate the interfaces needed and I succeed.

                  場景 1:我嘗試使用 Java 8 32-bit 安裝訪問 32 位應(yīng)用程序.我可以通過 COM 調(diào)用方法成功沒有任何問題.

                  Scenario 1: I try to access the 32-bit application using the Java 8 32-bit installation. I can invoke the methods through COM succesfully without any problem.

                  場景 2:我嘗試使用 Java 8 64 位安裝訪問 32 位應(yīng)用程序.我收到一條錯誤消息:

                  Scenario 2: I try to access the 32-bit application using a Java 8 64-bit installation. I get an error message:

                  Exception in thread "main" com4j.ExecutionException: com4j.ComException: 80040154 CoCreateInstance failed : Class not registered : .com4j.cpp:153
                  

                  我在 Stackoverflow/Google 上搜索了異常,我做了以下操作:

                  I searched for the exceptin on Stackoverflow/Google and I have done the following:

                  1) 使用 Sys64WOW/regsvr32.exe 和 System32/regsvr32.exe 注冊應(yīng)用程序的 dll

                  1) Registered the application's dll using both Sys64WOW/regsvr32.exe and the System32/regsvr32.exe

                  2) 使用 Sys64WOW/regsvr32.exe 和 System32/regsvr32.exe 注冊 com4j dll(32 位和 64 位)

                  2) Registered the com4j dll (both 32 and 64 bit) using both Sys64WOW/regsvr32.exe and the System32/regsvr32.exe

                  3) 復(fù)制 Sys64WOW 和 System32 文件夾中的 dll.

                  3) Copied the dlls in the Sys64WOW and System32 folders.

                  我已經(jīng)分別完成了以上所有操作,檢查了所有可能的組合.上述使用 64 位 Java 的錯誤仍然存??在.

                  I have done all the above separatelly, checking all the possible combinations. The afortementioned error using 64-bit Java still exists.

                  我嘗試過使用另一個網(wǎng)橋(Jacob).在 32 位 Java 上成功,在 64 位 Java 上失敗.

                  I have tried using another bridge (Jacob). On 32-bit Java it succeeds, on 64-bit Java it fails.

                  我有一個問題想問可能知道的人:有什么方法可以連接一個應(yīng)用程序,據(jù)我所知,該應(yīng)用程序僅提供 Win32 COM dll[1],使用任何可用的 Java/COM 橋和 Java 64bit?還是只是 32 位 COM + 64 位 Java 無法連接?

                  I have a question for someone that might knows: Is there any way to connect an app that, as far as I can tell, offers only a Win32 COM dll[1], using any of the available Java/COM bridges and Java 64bit? Or simply 32-bit COM + 64-bit Java are not connectable?

                  [1]:我檢查了 OLE/COM 查看器,在類型庫下只有一個條目 "0 Win32 = ,所以我暗示這意味著沒有 Win64 COM dll,對吧?

                  [1]: I checked the OLE/COM Viewer and under the Type Library there's is only one entry "0 Win32 = , so I implied that this means there's no Win64 COM dll, right?

                  推薦答案

                  這不起作用,因為您的客戶端進程和 COM DLL 的位數(shù)不匹配.在嘗試創(chuàng)建新實例時,CoCreateInstance 會嘗試在注冊表的 64 位配置單元中查找相關(guān)的類信息.這會失敗,因為它實際上位于您注冊 DLL 的 32 位配置單元中.

                  This won't work because the bitness of your client process and COM DLL don't match. When trying to create a new instance, CoCreateInstance tries to find related class information in the 64-bit hive of the registry. This fails because its actually located in the 32-bit hive, where you registered the DLL.

                  要解決這個問題,您可以選擇使用代理進程,它允許您的 CoClass 在不同的本地進程中實例化.然后,您的客戶可以通過 IPC 與代理進行通信(請參閱 這里了解更多信息).

                  To remedy this, you have the option of using a surrogate process, which allows your CoClass to be instantiated in a distinct native process. Your client can then communicate with the surrogate via IPC (see here for further info).

                  作為快速入門,您可以將您的 CoClass 標記為默認 dllhost.exe 代理進程的候選者:OLE/COM Object Viewer (x86) as Admin > All Objects > [Your CoClass]> 實施 > 使用代理過程(將路徑留空).

                  As a quick start, you can mark your CoClass as a candidate for the default dllhost.exe surrogate process: OLE/COM Object Viewer (x86) as Admin > All Objects > [Your CoClass] > Implementation > Use Surrogate Process (leave path empty).

                  如果您打算分發(fā)您的應(yīng)用程序,您可以將此信息放在 REG 腳本中或?qū)⒛?DLL 導(dǎo)入 COM+ 服務(wù)器應(yīng)用程序.

                  If you intend to distribute your application, you may place this information in a REG script or import your DLL into a COM+ server application.

                  這篇關(guān)于使用 Com4j 或 Jacob 連接 64 位 Java 和 32 位 COM dll的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個隨機打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲為 int?)

                    • <small id='Zk5EG'></small><noframes id='Zk5EG'>

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

                            主站蜘蛛池模板: 罐体电伴热工程-消防管道电伴热带厂家-山东沃安电气 | 背压阀|减压器|不锈钢减压器|减压阀|卫生级背压阀|单向阀|背压阀厂家-上海沃原自控阀门有限公司 本安接线盒-本安电路用接线盒-本安分线盒-矿用电话接线盒-JHH生产厂家-宁波龙亿电子科技有限公司 | 天然气分析仪-液化气二甲醚分析仪|传昊仪器 | 上海乾拓贸易有限公司-日本SMC电磁阀_德国FESTO电磁阀_德国FESTO气缸 | 昊宇水工|河北昊宇水工机械工程有限公司 | 工业雾炮机_超细雾炮_远程抑尘射雾器-世纪润德环保设备 | 酒店厨房设计_中央厨房设计_北京商用厨房设计公司-奇能商厨 | 咖啡加盟,咖啡店加盟连锁品牌-卡小逗| 蜘蛛车-登高车-高空作业平台-高空作业车-曲臂剪叉式升降机租赁-重庆海克斯公司 | 中国在职研究生招生信息网| EDLC超级法拉电容器_LIC锂离子超级电容_超级电容模组_软包单体电容电池_轴向薄膜电力电容器_深圳佳名兴电容有限公司_JMX专注中高端品牌电容生产厂家 | 多功能三相相位伏安表-变压器短路阻抗测试仪-上海妙定电气 | MES系统工业智能终端_生产管理看板/安灯/ESOP/静电监控_讯鹏科技 | 自动焊锡机_点胶机_螺丝机-锐驰机器人 | 考勤系统_考勤管理系统_网络考勤软件_政企|集团|工厂复杂考勤工时统计排班管理系统_天时考勤 | 煤棒机_增碳剂颗粒机_活性炭颗粒机_木炭粉成型机-巩义市老城振华机械厂 | 铝箔袋,铝箔袋厂家,东莞铝箔袋,防静电铝箔袋,防静电屏蔽袋,防静电真空袋,真空袋-东莞铭晋让您的产品与众不同 | 温湿度记录纸_圆盘_横河记录纸|霍尼韦尔记录仪-广州汤米斯机电设备有限公司 | 次氯酸钠厂家,涉水级次氯酸钠,三氯化铁生产厂家-淄博吉灿化工 | LCD3D打印机|教育|桌面|光固化|FDM3D打印机|3D打印设备-广州造维科技有限公司 | 电缆隧道在线监测-智慧配电站房-升压站在线监测-江苏久创电气科技有限公司 | PCB接线端子_栅板式端子_线路板连接器_端子排生产厂家-置恒电气 喷码机,激光喷码打码机,鸡蛋打码机,手持打码机,自动喷码机,一物一码防伪溯源-恒欣瑞达有限公司 假肢-假肢价格-假肢厂家-河南假肢-郑州市力康假肢矫形器有限公司 | 头条搜索极速版下载安装免费新版,头条搜索极速版邀请码怎么填写? - 欧远全 | 无缝方管|无缝矩形管|无缝方矩管|无锡方管厂家 | 壹作文_中小学生优秀满分作文大全 | 微型驱动系统解决方案-深圳市兆威机电股份有限公司 | 纯化水设备-纯水设备-超纯水设备-[大鹏水处理]纯水设备一站式服务商-东莞市大鹏水处理科技有限公司 | 伺服电机_直流伺服_交流伺服_DD马达_拓达官方网站 | 网优资讯-为循环资源、大宗商品、工业服务提供资讯与行情分析的数据服务平台 | 中医治疗皮肤病_潍坊银康医院「山东」重症皮肤病救治平台 | 苏州防水公司_厂房屋面外墙防水_地下室卫生间防水堵漏-苏州伊诺尔防水工程有限公司 | SRRC认证_电磁兼容_EMC测试整改_FCC认证_SDOC认证-深圳市环测威检测技术有限公司 | 高空重型升降平台_高空液压举升平台_高空作业平台_移动式升降机-河南华鹰机械设备有限公司 | 南京泽朗生物科技有限公司 | 专业甜品培训学校_广东糖水培训_奶茶培训_特色小吃培训_广州烘趣甜品培训机构 | 碳化硅,氮化硅,冰晶石,绢云母,氟化铝,白刚玉,棕刚玉,石墨,铝粉,铁粉,金属硅粉,金属铝粉,氧化铝粉,硅微粉,蓝晶石,红柱石,莫来石,粉煤灰,三聚磷酸钠,六偏磷酸钠,硫酸镁-皓泉新材料 | 郑州水质检测中心_井水检测_河南废气检测_河南中环嘉创检测 | 东莞韩创-专业绝缘骨架|马达塑胶零件|塑胶电机配件|塑封电机骨架厂家 | ge超声波测厚仪-电动涂膜机-电动划格仪-上海洪富 | 长沙中央空调维修,中央空调清洗维保,空气能热水工程,价格,公司就找维小保-湖南维小保环保科技有限公司 | 99文库_实习生实用的范文资料文库站 |