开发者

Pointer parameter with JNI

I've got function from dll file with my RFID reader.

long WI开发者_如何学编程NAPI OpenComPort(long* Port, unsigned char *ComAddr , unsigned char *Baud,long *FrmHandle)

i don't have any idea for sent parameter from java to this function. I were try many type of parameter but this fail. Please teach me send parameter to this function.

sry if my english is hard to read.


You have to pass an Java object to your JNI function, and create the corresponding struct in there and fill it. Then you can pass a pointer to this struct to your WinAPI function. Maybe JNA is a quicker solution than writing a JNI library.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜