JNA set pointer to Boolean
How is possible to set a pointer to a boolean value? For long I use:
Pointer pointer = new Memory (size);
pointer.setLong(0, longValue);
pointer.setBoolean(...)
is not defined, so for boolean I tray to use 开发者_StackOverflow社区a setInt but not wrok.
Use IntByReference .
IntByReference ref = new IntByReference();
/*Pass ref as argument to some function*/
if(ref.getValue() == 0)
...
else
...
精彩评论