How can I call a method with this method signature in C from JNA?
int open_device(context *ctx, device **dev, int index);
The last two line
There are no pointers in Java, only references.
You cannot reassign a reference when you pass them to methods, because you pass them by value. Everything is passed by value in Java.
You can rewrite this method to instantiate a new instance of the device and return that instead of an int.