Click to See Complete Forum and Search --> : JNI


liate
May 1st, 2002, 04:54 AM
I am using JNI to call a method written in java from c++. The java method should return a char array.
For example, I use: buff[0] = (char)196. (buff is the array of chars). When I check it, I see that indeed buff[0] contains the correct value.
When the C++ code is trying to use this array, it finds that buff[0] contains 195, and that buff[1] was changed from an empty char to another char with a low ascii value.
Does anyone have an idea why it is happening?

Thanks!