what's the C++/Windows.h defined equivalent for a java boolean?
i have a java method that returns a boolean, and i'm calling it from the native side.
is it ok to assume, that if i were to pass a value from a java method returning, let's say, an int to a windows.h defined data type like BOOL, is it ok? or do i have to cast it explicitly or something?
also does anyone know of a good JNI complete reference book? it's very hard to find one here in our local bookstores. having to order it online is something else, since i can't check the contents. any suggestions?
I've never done it, but your idea of an int does sound sensible. Can't you just try it out and see if it works?
Just take a look at jni.h that is places under your jdk home dir. You will find all the java types defenitions there.
nah, it's BOOL as typdefed in windows.h. it's a 16-bit integer that returns a 1 or 0 for true and false. and i don't have to cast it or anything. was just wondering since what to place in e.g.( " is true or false %? ", MYBOOLVAR ). boolean is written jboolean when calling from the native side.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center