On Oct 16, 2007, at 2:45 PM, Sri wrote:
I am quite sure about the function name being 'GetTimings' coz I used
StdCallFunctionMapper of JNA to get the native method name.
The .dll is getting
loaded fine, but it complains about function not being in the .dll .
Dump the symbols from the DLL and then you'll be sure. "nm",
"objdump" work on linux, I don't recall offhand what you'd use for
windows.
native method signature:
------------------------
public int GetTimings(string timings, byte[] intem, out int outTemp);
That's not a "C" interface. Assuming that's a C++ stl "string", JNA
can't create one; it'll only convert java.lang.String to "const
char*". The "out" usually means that the function expects a pointer
to the given type.
If that's C++ or C#, the function's name is going to be mangled
unless you declare it as 'extern "C"'.
method signature in my interface which extends Library
com.sun.jna.Library
----------------------------------------------------------------------
----
public int GetTimings(String timings, byte[] intem, int outTemp);
Your library should derive from StdCallLibrary if that is the calling
convention your library uses.