aspose file tools
The moose likes Other JSE/JEE APIs and the fly likes JNI and return bool statement problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "JNI and return bool statement problem" Watch "JNI and return bool statement problem" New topic
Author

JNI and return bool statement problem

Kacper Lekstan
Greenhorn

Joined: Apr 12, 2012
Posts: 1

This is my first post here so Hello Everyone

I have small (I guess) problem with c++ but its directly connected with JNI... so the problem is: I wrote a program in Java to maintain some kind of hardware box... to do this I had to use JNI because there was no any jar, only one *.lib, so base on lib functions I wrote java class and generete c++ headerer and I created c++ lib to have possibility to use nativ lib. Till this moment everything was fine but i had to return box and now im trying to write some kind of nativ virtual library so I can simulate this box and here is the problem:





as I marked higher return of ReadDigitalChannel(Channel); is always true no matter what I put into its body

thank you for any tips/solution/clue

Regards

SOLUTION

the simplest answer is: C have no bool statement so changing return type into int solving problem

cheers
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JNI and return bool statement problem
 
Similar Threads
JNI
jni methos in c++ class
JNI What is it, and can I use it
From where can I get 'jni.h' file???
does java support shared memory concept