I am using a C API which I want to call from Java using JNI. I have this working but there is one thing I'd like to change.
The C returns a handle which is essentially a void*
Many of the subsequent C API calls require the void* to be passed into it e.g.
a = call1();
What I'd like to do is make call1 and call2 from Java but this will require that I transfer the void* to java and pass it back into call2.
After a run through all the JNI stuff I could find I couldn't find a way of doing this. It might not be possible but I'm sure someone here can tell me definitively!
Thanks in advance.