2 messages in net.java.dev.jna.users[jna-users] example of an Array of St...
FromSent OnAttachments
MichaelDec 22, 2008 6:19 pm 
MichaelDec 23, 2008 6:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] example of an Array of Struct being passed to a callbackActions...
From:Michael (java@nemonik.com)
Date:Dec 22, 2008 6:19:30 pm
List:net.java.dev.jna.users

I've been hammering my head against this for two days now. Does anyone have a simple example of an Array of Struct being passed to a com.sun.jna.Callback described callback method through JNA that you'd care to share?

Of all the various ways I've tried to shake this loose, I can only seem to get at the first Struct in the array.

The Java version of the struct is quite simple:

public class RegionElement extends Structure { public long frameId; public double[] regionBox = new double[4]; };

The C-verison:

struct RegionElement { long long frameId; double regionBox[4]; };