I use ffi(-napi) to run function, in a DLL, that returns a pointer on a C structure.
const structEl = new StructType({
label: string;
});
const structResult = StructType({
number_of_els: ref.types.int,
els: ref.refType(structEl);
});
I'm expecting els
to be an array of structures. This question is about array of structures as a parameter but I could find no question about the returned value.
I am able to access the first element of the array, but I can't seem to access the following elements.
Am I doing anything wrong?