1 message in net.java.dev.jna.usersjna structure endianess
FromSent OnAttachments
vsworkFeb 13, 2008 4:27 am 
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 structure endianessActions...
From:vswork (vsw@yandex.ru)
Date:Feb 13, 2008 4:27:40 am
List:net.java.dev.jna.users

Good day,

I have structure

class MyStructure extends Structure {

...

int field;

...

}

Instance of MyStructure is filled during call to native method to DLL on x86 via
JNA.

Question is: should field on return from JNA fieldhave value in java-endian
(big-endian) or little-endian of x86?

My result is that field have little-endian format, which, of course,
unfortunate, as I can't use MyStructure after call return without further
conversions.

And another question is: how can I tell jna to automatically convert endianess?