02-19-2009 02:57 PM
Hello,
I'm a newbie with a big problem:
I need to write some ANSI C DAQmx functions (for example DAQmxCreateTask, or DAQmxStopTask) in Java using the "Java Native Interface" JNI.
My Problem is the TaskHandler.
How do I get the TaskHandler into Java?
For Example: I write two Java native Functions "Java_DAQmxCreateTask" and "Java_DAQmxStopTask". OK - But to stop the task i need to know the TaskHandler in Java.
Is it possible to convert the TaskHandler to a jint or a jdouble or jlong datatype and use the return value from my "Java_DAQmxCreateTask" function for the paramenter in the "Java_DAQmxStopTask(taskhandler)" function? Or is there a way, to create a TaskHandler in Java?
Example java code:
taskHandler = Java_DAQmxCreateTask(.....)
...
Java_DAQmxStopTask(taskHandler)
thank you very much for your support
and best regards
Solved! Go to Solution.
02-20-2009 08:15 AM
Hi again,
i fixed it by myself.
i just converted the TaskHandler with (long).
regards