I\'m trying to use JNA with a DLL in Windows, so far I was able to successfully call a function called c_aa_find_devices()
. But all the functions start with
Using StdCallMapper won't do good - it is supposed to map werid windows std lib names that have embedded total byte lenght of parameters embedded as part of the name. Since it is done to std lib only (just guessing on that, but 99% you'r functions are not the case).
If your dll uses some common prefix on all functions you need just to use something like:
class Mapper implements FunctionMapper{
public String getFunctionName(NativeLibrary library, Method method) {
return GenieConnector.FUNCTION_PREFIX + method.getName();
}
}
Where GenieConnector.FUNCTION_PREFIX
is that common prefix. Bear in mind that i implement FunctionMapper
, not extend StdCallMapper