I'm calling a DLL compiled with the VisualStudio 2005 with the "#pragma pack(1)" setting. So the structure alligment (SA) is without padding for fast data access [1]. I think the JVM is compiled with normal structure alligment [2].
So I want to know what are my options? The call to the dll(I'm not in Codecontrol) is going through a wrapper dll (I'm in Codecontrol).
- Can I call out of the Wrapper a dll with another SA setting? So that the Wrapper-Dll, which is called from Java uses the normal SA setting and calls a dll which is compiled with #pragma pack(1) set.
- Is it possible to do a setting in JNI to call dlls with #pragma pack(1) set?
- I also could use JNA. Is there a possibility to do such an setup.
[2] http://www.velocityreviews.com/forums/t128433-jni-with-1-byte-alignment-crashes-jvm.html