java – JNA库,缺少Windows功能:如何添加新功能?

我有一个关于
Java和jna库的问题.我从java.net下载了两个jar(jna.jar和platform.jar).

在com.sun.jna.platform.win32包中已经有一些定义的接口链接win dll,但是在Kernel32文件中,缺少一个函数,函数是DeviceIoControl.

我的问题是:

>在哪里可以找到所有windows dll的完整列表,其中包含所有函数的完整列表,并且可能包含所有Windows版本的兼容列表? (很重要)
从msdn站点我发现了完整的函数列表,其中包含函数所在的库的名称,但不包含其他函数.
>我可以创建一个扩展Kernel32的新界面,所以我可以添加缺少的功能吗?
为什么从项目的官方网站,在他们的罐子里,有些功能不存在?

感谢所有提前

弗朗切斯科

最佳答案

Q: Where can i find a complete list of all windows dll with a complete
list of all functions, and possibly with a compatibily list with all
of windows versions? (very important) From msdn site i’ve found the
complete function list with the name of the library where the
functions are contained, but not the other.

答:是的,MSDN图书馆网站是http://msdn.microsoft.com/en-us/library/default.aspx的首选.但是,我不明白为什么你找不到其他人.如果您知道如何搜索它们,它就完全在那里.但是,有些函数可能不容易像COM接口那样很难正确地转换成JNA版本.

Q: Can i create a new interface that extends Kernel32, so i can add
the missing functions? Why from the official site of the project, in
their jar, some functions are not present?

答:是的,很可能.当前表单中的JNA Win32平台仅提供Kernel32常用功能的基本接口,您可能需要为缺少的功能添加自己的接口.

点赞