开发者

What is the Java type for *short using JNA

Wh开发者_运维技巧at is the Java type for *short using JNA

I have in my dll short and *short, so how can I call short -> int *short -> int[]?

Thanks, Alex


C short types map to Java short types.

C short* (pointer to a short) maps to Java using JNA's ShortByReference.

If you want to map pointers to arrays, simply write the function in Java using arrays, a function with signature

void foo(int *buf)

Maps in Java as

static void native foo(int[] buf);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜