1

如何设置指向布尔值的指针?长期以来,我使用:

Pointer pointer = new Memory (size);
pointer.setLong(0, longValue);

pointer.setBoolean(...)未定义,因此对于布尔 I 托盘使用 setInt 但不是 wrok。

4

1 回答 1

0

使用 IntByReference 。

  IntByReference ref = new IntByReference();
   /*Pass ref as argument to some function*/
  if(ref.getValue() == 0)
     ...
  else
     ...
于 2011-08-08T02:33:47.567 回答