4

我想从这样的指针中获取一个数组:

PointerByReference buf=new PointerByReference();
IntByReference len=new IntByReference(); 

myLib.getPoints(buf,len);

Pointer p=buf.getValue();
JNAPoint jnaPoint=new JNAPoint(p);
JNAPoint[] points=(JNAPoint[])jnaPoint.toArray(len.getValue());

函数原型为:void __declspec (dllexport) getPoints(point** tab,int* len);

结构是: typedef struct _point { double x; 双 y; } 观点;

但是,当我想读取数组“点”时,值是错误的。

有错误吗?

谢谢

4

0 回答 0