Getting a 32-bit COM client for working with a 64-bit server outside the processor using Java / JaCoB

This question indicates that a 32-bit COM client can talk to a 64-bit COM server (and vice versa) if the server is down. I am trying to implement a client using the Java Com Bridge (JaCoB) library so that I can talk to a third-party off-processor server, which should be possible in accordance with this question . The test code used is successfully executed if I map the process architectures (32-bit or 32-bit or 64-bit, 64-bit), but with an error for any cross-combination with this exception:

Exception in thread "main" com.jacob.com.ComFailException: A COM exception has been encountered:
At Invoke of: Execute
Description: Invalid callee.

    at com.jacob.com.Dispatch.invokev(Native Method)
    at com.jacob.com.Dispatch.invokev(Dispatch.java:858)
    at com.jacob.com.Dispatch.callN(Dispatch.java:455)
    at com.jacob.com.Dispatch.call(Dispatch.java:544)
    at com.jacob.activeX.ActiveXComponent.invoke(ActiveXComponent.java:447)
    ...

Any ideas?


Update

, COM DISP_E_BADCALLEE. - , - , . COM- - MATLAB, Execute Quit. COM ( OLEView):

BSTR _stdcall ([in] BSTR Name); void _stdcall Quit();

:

public static void main(String[] args) {
    ActiveXComponent ml = new ActiveXComponent("Matlab.Application.Single.7");
    System.out.println(ml.invoke("Execute","version"));
    ml.invoke("Quit");
    ml.safeRelease();
}
+3
1

Com4J COM Control Access, , ActiveX ( ), , :

  • Com4J .
  • VB6 COM, COM, , , Com4J

, OLE

  • SWT COM Brigde.

, ( , ActiveX, ).

+1

Source: https://habr.com/ru/post/1784561/


All Articles