How to set global memory byte alignment for all structures in JNA library?
问题 Is there any way to set global memory byte alignment for all data structures in JNA library (*.dll Java wrapper)? Sometimes I have to determine correct alignment by trial and error during implementation and currently I'm doing this in very clumsy way - I'm setting data alignment (super(ALIGN_NONE)) in each and every structure (a lot of structures in separate files). edit: The best way to solve my problem was to extend Structure: public abstract class StructureAligned extends Structure {