Possible Duplicate:
How to pass C structs back and forth to Java code in JNI?
I am writing a native library whose function takes a file location as an argument and returns a struct containing a pointer to an array, its array_size and no_of_clicks. A search on the internet have reveled some answers but none clear enough for me. It would be helpful if you could explain it with an example.
For instance, I have the following struct
typedef struct {
int size;
int no_of_clicks;
float *array_location;
}return_array;
basically this struct contains the pointer to a float array location and the size of the array and an additional parameter, no_of_clicks. How do i pass this to the java side and access it there?