在java中,用JNA怎么去转ulib_c_initialize结构体???

ljh205_sy 2015-02-19 08:58:26
如果自定义的结构体该如何写呢?

ULIB_C_API int ULIB_C_CALL ulib_c_initialize(const char* appKey, const ulib_c_callback_t* callbacks);

typedef struct
{
ulib_c_on_send_message_event sendMessageCallback;
ulib_c_on_receive_message_event receiveMessageCallback;
ulib_c_on_download_message_attachment_event downloadAttachmentCallback;
} ulib_c_callback_t;

typedef void (ULIB_C_CALL *ulib_c_on_send_message_event)(const char* messageId, int sendResult);
typedef void (ULIB_C_CALL *ulib_c_on_receive_message_event)(const char* message);
typedef void (ULIB_C_CALL *ulib_c_on_download_message_attachment_event)(const char* messageId, int downloadResult);


不知道用java使用JNA怎么去写方法ulib_c_initialize代码。。。
大神能指导一下吗? 谢谢了
...全文
116 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ljh205_sy 2015-02-19
  • 打赏
  • 举报
回复
JNA 怎么去定义ulib_c_callback_t 这个结构体?? 主要是解决这个问题,实在是不懂
ljh205_sy 2015-02-19
  • 打赏
  • 举报
回复
在线等,有牛人来帮忙解答下吗? 谢谢了

5,530

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 模式及实现
社区管理员
  • 模式及实现社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧