久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <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="qwawimqqmiuu" 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="qwawimqqmiuu" id='COmc2'><tfoot id='COmc2'></tfoot><dl id='COmc2'><fieldset id='COmc2'></fieldset></dl></div>

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

                  問題描述

                  我有以下配置:

                  1) Windows 10 64 位

                  1) Windows 10 64-bit

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

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

                  我使用 tlbimb.jar 訪問 32 位應用程序的 .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 位應用程序.我可以通過 COM 調用方法成功沒有任何問題.

                  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 位應用程序.我收到一條錯誤消息:

                  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 注冊應用程序的 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) 復制 Sys64WOW 和 System32 文件夾中的 dll.

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

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

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

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

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

                  我有一個問題想問可能知道的人:有什么方法可以連接一個應用程序,據我所知,該應用程序僅提供 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 的位數不匹配.在嘗試創建新實例時,CoCreateInstance 會嘗試在注冊表的 64 位配置單元中查找相關的類信息.這會失敗,因為它實際上位于您注冊 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).

                  如果您打算分發您的應用程序,您可以將此信息放在 REG 腳本中或將您的 DLL 導入 COM+ 服務器應用程序.

                  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.

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

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

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 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="qwawimqqmiuu" id='Zk5EG'><tfoot id='Zk5EG'></tfoot><dl id='Zk5EG'><fieldset id='Zk5EG'></fieldset></dl></div>

                            主站蜘蛛池模板: 毛片免费看 | av一区二区在线观看 | 极品一区| 国产精品一区二区久久 | 久久久久国产一区二区三区 | 国产精品99久久久久久动医院 | 国精久久 | 国产欧美日韩久久久 | 干干干操操操 | 毛片一区二区三区 | 日韩精品专区在线影院重磅 | 精品一区二区在线视频 | 亚洲品质自拍视频 | 亚洲欧美日本在线 | 久久这里只有精品首页 | 久久手机在线视频 | 黄色片av | 久草在线在线精品观看 | 天天干天天干 | 国产激情视频在线免费观看 | 春色av| www.国产91 | 亚洲 欧美 在线 一区 | a a毛片 | 亚洲美女一区二区三区 | 夜夜骚视频| 精品一区二区三区视频在线观看 | h漫在线观看 | www国产成人 | 黄色播放 | 欧美精品欧美精品系列 | 99热在线观看精品 | av性色全交蜜桃成熟时 | 国产精品99久久久久久久久 | 99精品一区二区三区 | 先锋av资源在线 | 久久久久久成人网 | 亚洲一区二区精品 | 九九热在线视频 | 免费av一区二区三区 | 欧美一区二区黄 |