Home > Back-end >  O great god told jna connection DLL file when why can't find the way
O great god told jna connection DLL file when why can't find the way

Time:11-10

Let me have the how do I get
1 I download a vs wrote a DLL file
The first 2 has two method is void say the second is the void __stdcall says
3 I wrote a connection in the Java class
4 I this connection type of inheritance is stdcalllibrary
5 two jna jar is 5.2 version of the
6 so I can only call the first method is the second call is error method to find the
7 etren C I also wrote
Please some expert told me this is what circumstance

CodePudding user response:

The function in the DLL should be exported C way, not C + + export

CodePudding user response:

The first is the void say the second is the void __stdcall says
The compiler of the function name modified, you can remove __stdcall try, use the default C call way,

CodePudding user response:

reference 1/f, play big shoot early nuclear response:
the function in the DLL export should be C way, don't export C + +

Brother, I wrote this function extern "C" is not in C export? I don't quite understand

CodePudding user response:

Use dumpbin. Exe/exports check export the function name, use vs. the default types should be _cdecl, if __stdcall way, may add some characters after the function name, can use __cdecl replace __stdcall try, but I use the BCB adopts __stdcall, there is no problem,
  • Related