高分求解!JNA通过参数返回数据
jna 生成的方法如下:
@DISPID(110) //= 0x6e. The runtime will prefer the VTID if present
@VTID(17)
int getSolutions(Object solutions);
solutions应该是一个二维数组
在delphi中定义,使用如下:
ob: array of array of Integer;
oe: OleVariant;
best:Integer;
best := mySol.GetSolutions(oe);
ob := oe; // 关键转换
ShowMessage(ob[0][0]);
ShowMessage(ob[0][1]);
ShowMessage(ob[0][2]);
ShowMessage(ob[0][3]);
....
在java中用JNA调用此方法不行,可能需要Holder的支持,但是不会写。
求前辈,高人赐教! 救人一命,早生七级浮屠啊