【问题标题】:Calling COM method in DLL using the JNI使用 JNI 在 DLL 中调用 COM 方法
【发布时间】:2011-08-03 02:47:58
【问题描述】:

我正在尝试使用 JNI 与第三方 DLL 集成。我编写了一个测试类来查看是否可以调用 DLL 中的方法,但我收到“UnsatisfiedLinkError”错误。

类如下所示:

public class MyTest {

    native String ConfigureRequest(String a, String b, String c, String d);

    static {
        System.loadLibrary("my_dll");
      }

    @Test
    public void quickTest(){

        String result = this.ConfigureRequest("1", "1", "1", "NoControlBar");

        System.out.println("Result: " + result );

    }

}

我已经使用TypeLibrary Viewer 来调查 DLL,我可以看到该方法在那里(尽管它在包“EIAComInterface.TxnRequests”中说它,所以我想知道我是否需要在某处指定包方法)。我也可以验证方法参数是否正确。

谁能给点建议?

非常感谢, 齿轮。

【问题讨论】:

    标签: dll com java-native-interface


    【解决方案1】:

    看起来 Jacozoom 似乎可以解决上述问题。就我而言,事实证明我可以使用 SOAP 来查询网络服务。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-05-13
      • 1970-01-01
      • 2012-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 2018-09-13
      相关资源
      最近更新 更多