V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
muyiluop
V2EX  ›  问与答

请教一下大家使用 JNA 调用 dll 文件 Java 的接口中的方法该怎么声明

  •  1
     
  •   muyiluop · Jul 22, 2020 · 822 views
    This topic created in 2107 days ago, the information mentioned may be changed or developed.

    例如下面的这个函数怎么在 JNA 中声明呢

    extern "C"  declspec(dllexport)  int   stdcall BuilData(char *Data, char *Key,char * KeyFactor, char* ReData1,char *ReData2)
    

    目前我写的如下:

     int BuilData(String hex, String key, String keyFactor, PointerByReference output1, PointerByReference output2,int encrypt);
    

    但是我这样写会报错,提示:java.lang.UnsatisfiedLinkError: 找不到指定的模块

    Supplement 1  ·  Jul 23, 2020
    已解决
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5703 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 06:15 · PVG 14:15 · LAX 23:15 · JFK 02:15
    ♥ Do have faith in what you're doing.