JNI GetShortArrayElements changing endianess of shorts?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Craig_Watson
Posted On:   Wednesday, September 17, 2003 08:15 AM

Hi, I am passing a shortArray from a Java app into a a JNI dll and upon writing the array to file in the native space it appears that the LSByte has swapped positions with the MSByte in all the array elements! Is this possible or am I being a fool? The variable "jshortArray inputShortArray" is passed into GetShortArrayElements and when I write out the resulting elements of the C array low and behold the byte order has been swapped. If it possible is there a setting I can alter to correct this? JVM 1.4.2 on Windows 2000 JBuilder and Visual C++. Regards Craig    More>>

Hi,


I am passing a shortArray from a Java app into a a JNI dll and upon writing the array to file in the native space it appears that the LSByte has swapped positions with the MSByte in all the array elements! Is this possible or am I being a fool?


The variable "jshortArray inputShortArray" is passed into GetShortArrayElements and when I write out the resulting elements of the C array low and behold the byte order has been swapped.


If it possible is there a setting I can alter to correct this?


JVM 1.4.2 on Windows 2000 JBuilder and Visual C++.


Regards


Craig

   <<Less
About | Sitemap | Contact