If a structure member is empty there is no need to define it. It's
probably defined on the native side in order to perform some address/
offset calculation on the empty field.
On May 11, 2009, at 3:19 PM, Zsolt Kúti wrote:
Hello,
A function's parameter is a struct that contains another struct as its
member. This member struct is an empty one, containing no members.
At initalization of the corresponding Structure object I get this:
java.lang.IllegalArgumentException: Can't determine size of
nested structure: Structure class hu.tinca.jburn.lib.Libburn
$burn_drive
has unknown size (ensure all fields are public) at
com.sun.jna.Structure.calculateSize(Structure.java:905) at
com.sun.jna.Structure.allocateMemory(Structure.java:228) at
com.sun.jna.Structure.<init>(Structure.java:145) at
com.sun.jna.Structure.<init>(Structure.java:135) at
com.sun.jna.Structure.<init>(Structure.java:131) at
com.sun.jna.Structure.<init>(Structure.java:127)
How can I use such an empty struct?