开发者

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
     ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜