Please direct future replies to the JNA users list.
On Oct 25, 2008, at 1:48 PM, Alejandro Vouilloz wrote:
Hi Timothy:
Im from Argentine and my english is very poor.
I have a function with follow signature:
int nfseg_primitive(
unsigned char *data,
int w,
int h,
unsigned char ***pdata,
seg_rec_coords** fing_boxes
) ;
The arg pdata is a output param, a pointer by reference to array of
image.
In JNA i parse this function like:
public int nfseg_primitive(
byte[] data,
int w,
int h,
PointerByReference pdata, //Retorno
Seg_rec_coords.ByReference[] fing_boxes
);
And i usage like:
PointerByReference pdata = new PointerByReference();
...
ret = nfseg.nfseg_primitive(data, w, h, pdata, boxes);
Here the jvm execution abort because the c funtion can't alloc
memory of unsigned char.
My question is:
I parse this param unsigned char ***pdata correctly or not?
Yes, you have mapped that part correctly. How does the function
fail? What does the JVM error log say?
Thanks for you time.
PD: JNA is amazing :-)
Thanks!