jna
java C数据类型对应关系
https://www.cnblogs.com/jkguo/p/11262741.html
jna对结构体、指针、引用、拷贝参数传递的使用
https://blog.csdn.net/xie_heng/article/details/49814207
byte [] ba =new byte[6];
//ba[3]=20 则int为 0x00001400
// 20 是 水平, 21是垂直
/* //垂直测试
ba[0] = 1;
ba[2]=21;
*/
ba[0] = 0;
ba[2] = 1;
int r= CLibrary.INSTANCE.CMDHardTest(handle,(byte)13, ba,nativeDll.LedTestCallBack,0);
用字符数组处理更简单
c中
typedef struct _CAMERA_ARG
{
BYTE mode;
BYTE rateType;
int param;
}CAMERA_ARG;