jna 如何调用此C语言写的dll中的方法?里面有输出参数
C:client_sdk_send_return(intloginfd,char*send_data,unsignedintsend_size,OUTchar*recv_...
C:client_sdk_send_return(int loginfd, char* send_data
, unsigned int send_size, OUT char* recv_data
, IN OUT unsigned int* recv_size);
引出来是这么写的
public boolean client_sdk_send_return(int loginfd, byte[] send_data, int send_size, byte[] recv_data ,IntByReference recv_size);
调用是这么写的
byte[] recv = new byte[0xFF];
IntByReference retlength = null;
boolean bret = CLS_MiddlewareSdk.clientsdk.client_sdk_send_return(loginfd, CLS_MiddlewareSdk.toutf8(json.toString()), CLS_MiddlewareSdk.toutf8(json.toString()).length + 1, recv, retlength);
运行后java和tomcat都崩了。大家帮忙看看什么问题 展开
, unsigned int send_size, OUT char* recv_data
, IN OUT unsigned int* recv_size);
引出来是这么写的
public boolean client_sdk_send_return(int loginfd, byte[] send_data, int send_size, byte[] recv_data ,IntByReference recv_size);
调用是这么写的
byte[] recv = new byte[0xFF];
IntByReference retlength = null;
boolean bret = CLS_MiddlewareSdk.clientsdk.client_sdk_send_return(loginfd, CLS_MiddlewareSdk.toutf8(json.toString()), CLS_MiddlewareSdk.toutf8(json.toString()).length + 1, recv, retlength);
运行后java和tomcat都崩了。大家帮忙看看什么问题 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询