如何使用JNA调用本地C/C++动态链接库详细示例代码

上传者: leo9909 | 上传时间: 2021-05-08 12:29:03 | 文件大小: 1.02MB | 文件类型: RAR
详细演示了如何通过JNA实现以下形式的动态链接库接口: 1:基本数据类型 2:基本数据类型的指针和引用 3:结构体 4:结构体的指针和引用 5:函数指针和回调函数 6:字符串指针 7:输入一个数组 8:输出一个数组并释放空间 本资源包括三个工程: C++动态链接库; VC调用本地动态链接库; JNA调用本地动态链接库;

文件下载

资源详情

[{"title":"( 57 个子文件 1.02MB ) 如何使用JNA调用本地C/C++动态链接库详细示例代码","children":[{"title":"My JNA Demo","children":[{"title":"CallDll","children":[{"title":".project <span style='color:#111;'> 383B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"CallMain","children":[{"title":"CallMain$DispLastSN.class <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":"CallMain$Rect$ByValue.class <span style='color:#111;'> 450B </span>","children":null,"spread":false},{"title":"CallMain$Rect.class <span style='color:#111;'> 496B </span>","children":null,"spread":false},{"title":"CallMain.class <span style='color:#111;'> 7.33KB </span>","children":null,"spread":false},{"title":"CallMain$Staff.class <span style='color:#111;'> 835B </span>","children":null,"spread":false},{"title":"CallMain$SerialNum$ByValue.class <span style='color:#111;'> 470B </span>","children":null,"spread":false},{"title":"CallMain$SimpleAdd.class <span style='color:#111;'> 521B </span>","children":null,"spread":false},{"title":"CallMain$DllInterface.class <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"CallMain$SerialNum.class <span style='color:#111;'> 920B </span>","children":null,"spread":false},{"title":"CallMain$OnAssignSN.class <span style='color:#111;'> 399B </span>","children":null,"spread":false},{"title":"CallMain$AssignMethod$ByReference.class <span style='color:#111;'> 498B </span>","children":null,"spread":false},{"title":"CallMain$SerialNum$ByReference.class <span style='color:#111;'> 486B </span>","children":null,"spread":false},{"title":"CallMain$CustumPlus.class <span style='color:#111;'> 239B </span>","children":null,"spread":false},{"title":"CallMain$Staff$ByReference.class <span style='color:#111;'> 470B </span>","children":null,"spread":false},{"title":"CallMain$Rect$ByReference.class <span style='color:#111;'> 466B </span>","children":null,"spread":false},{"title":"CallMain$AssignMethod.class <span style='color:#111;'> 575B </span>","children":null,"spread":false},{"title":"CallMain$Char32msg.class <span style='color:#111;'> 585B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"src","children":[{"title":"CallMain","children":[{"title":"CallMain.java <span style='color:#111;'> 9.07KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'> 347B </span>","children":null,"spread":false},{"title":"DllTest.dll <span style='color:#111;'> 128.00KB </span>","children":null,"spread":false},{"title":"jna.jar <span style='color:#111;'> 925.88KB </span>","children":null,"spread":false}],"spread":true},{"title":"DllTest","children":[{"title":"DllTestUse","children":[{"title":"DllTestUse.cpp <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 2.80KB </span>","children":null,"spread":false},{"title":"DllTestUse.h <span style='color:#111;'> 528B </span>","children":null,"spread":false},{"title":"DllTestUseDlg.h <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 210B </span>","children":null,"spread":false},{"title":"DllTestUse.aps <span style='color:#111;'> 58.07KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 4.21KB </span>","children":null,"spread":false},{"title":"DllTestUse.rc <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"DllTestUseDlg.cpp <span style='color:#111;'> 7.96KB </span>","children":null,"spread":false},{"title":"DllTestUse.vcproj.PC-201001210016.Administrator.user <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false},{"title":"DllTestUse.vcproj <span style='color:#111;'> 5.40KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"DllTestUse.rc2 <span style='color:#111;'> 401B </span>","children":null,"spread":false},{"title":"DllTestUse.ico <span style='color:#111;'> 21.12KB </span>","children":null,"spread":false}],"spread":false},{"title":"DllTest.dll <span style='color:#111;'> 120.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"DllTest","children":[{"title":"DllTest.aps <span style='color:#111;'> 18.38KB </span>","children":null,"spread":false},{"title":"DllTest.def <span style='color:#111;'> 425B </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 209B </span>","children":null,"spread":false},{"title":"DllTest.rc <span style='color:#111;'> 3.00KB </span>","children":null,"spread":false},{"title":"DllTest.sln <span style='color:#111;'> 878B </span>","children":null,"spread":false},{"title":"DllTest.opt <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false},{"title":"DllTest.vcproj <span style='color:#111;'> 6.81KB </span>","children":null,"spread":false},{"title":"DllTest.plg <span style='color:#111;'> 1.73KB </span>","children":null,"spread":false},{"title":"DllTest.suo <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false},{"title":"DllTest.clw <span style='color:#111;'> 328B </span>","children":null,"spread":false},{"title":"DllTest.dsw <span style='color:#111;'> 539B </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 2.52KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"DllTest.dsp <span style='color:#111;'> 4.07KB </span>","children":null,"spread":false},{"title":"DllTest.h <span style='color:#111;'> 2.62KB </span>","children":null,"spread":false},{"title":"Resource.h <span style='color:#111;'> 379B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"DllTest.rc2 <span style='color:#111;'> 399B </span>","children":null,"spread":false}],"spread":false},{"title":"DllTest.cpp <span style='color:#111;'> 5.89KB </span>","children":null,"spread":false},{"title":"DllTest.vcproj.PC-201001210016.Administrator.user <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false}],"spread":false},{"title":"DllTestUse.sln <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • caizi02 :
    不错,好用,不错的资源
    2019-06-24
  • 才子02 :
    不错,好用,不错的资源
    2019-06-24
  • u012600155 :
    有一定的使用价值
    2019-01-23
  • chadleen :
    有一定的使用价值
    2019-01-23
  • fighting_boss :
    还不错,只不过编译后是32位,需要重新编译才可以使用。
    2018-09-21
  • Fighting_Boss_Hao :
    还不错,只不过编译后是32位,需要重新编译才可以使用。
    2018-09-21
  • chenhai201 :
    代码能用,但是dll不能用,楼主应说明该dll是32位的还是64位的,这个在jna里是个大坑
    2016-10-18
  • chenhai201 :
    代码能用,但是dll不能用,楼主应说明该dll是32位的还是64位的,这个在jna里是个大坑
    2016-10-18
  • ljh205_sy :
    不错,对我帮助挺大的
    2015-03-08
  • ljh205_sy :
    不错,对我帮助挺大的
    2015-03-08
  • sugaoren :
    还可以,可以学习下。
    2015-01-20
  • chbJava :
    一个很不错的例子,学习了,不过跟我需要的好像不太相符
    2015-01-11
  • Chills7191 :
    这个不错,要大力支持!!!!!!!!
    2014-12-31
  • wood07 :
    为什么我的在eclipse里面直接导入项目后,RUN时报错?Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: U
    2014-08-26
  • 常羊 :
    不错,各种情况都用例子给出示范 了,非常好,谢谢了
    2014-07-22

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明