You must annotate the class with Structure.FieldOrder
or implement getFieldOrder()
, whichever you choose it must contain the field names (Strings) indicating the proper order of the fields. If you chose to implement getFieldOrder()
notice that when dealing with multiple levels of subclasses of Structure, you must add to the list provided by the superclass getFieldOrder()
the fields defined in the current class.
Note the order seems to be predictable but that isn't guaranteed, so you can't just use that order.
In the past, most VMs would return them in a predictable order, but the JVM spec does not require it, so getFieldOrder()
is now required to ensure JNA knows the proper order).
--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jna-users/2b4cb114-ca7b-4b5f-8afc-3e22c833e976n%40googlegroups.com.