I have a dll (with source) LibUVCCam.dll that I want to implement using Java JNA. I've followed the msvcrt tutorial and it works.
Using dependency walker, I dumped the names of the functions and get things like ?listDevices@UVCCameraLibrary@@SAXPEAPEADAEAH@Z and I want to implement listDevices(). How do I define that in:
public interface JNALoader extends Library
{
JNALoader INSTANCE = (JNALoader) Native.loadLibrary(("LibUVCCam"), JNALoader.class);
???? listDevices() // ???? = I don't know what to do here.
}
Here is the function from the source of the library:
/*
* static function
* List connected devices
* @cameraNames : (out) name list of connected cameras
* @nDevices : (out) the number of connected cameras
*/
void UVCCameraLibrary::listDevices(char **cameraNames , int &nDevices)
{
...
}
The full source for the project is https://github.com/sky19938470/uvcamera-windows-project/tree/master/LibUVCCam.