There isn't any direct mapping, since there isn't a canonical two-
dimensional data layout in C.
You'll have to set up the data manually, or create a class to handle
the layout. See StringArray in Function.java; it maintains an array
of char*, which might be similar to what you're doing.
Figure out what your data should look like on the Java side, then do
the conversion to a Pointer type.
If you want your defined interface to take a two-dimensional java
array, e.g.
void foo(int[][] data)
then you'll need to define a type mapper which converts the java type
int[][] into a type the invocation layer can handle (namely, Pointer).
On Aug 29, 2007, at 4:42 PM, Albert Strasheim wrote:
Hello all
I'm trying to map a function that takes a two-dimensional array
parameter, like:
void foo(int* bar[]);
or equivalently:
void foo(int** bar);
I took a quick look at the JNA unit tests, but I couldn't find an
obvious example of how to map this kind of parameter.
Any help would be appreciated.
Cheers,