gpt4 book ai didi

java - JNA 库,缺少 Windows 函数 : how to add new functions?

转载 作者:可可西里 更新时间:2023-11-01 14:19:39 30 4
gpt4 key购买 nike

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

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

我的问题是:

  1. 我在哪里可以找到所有 Windows dll 的完整列表以及所有功能的完整列表,可能还有所有 Windows 版本的兼容性列表? (很重要)从 msdn 站点我找到了完整的函数列表,其中包含函数所在的库的名称,但没有找到其他函数。

  2. 我能否创建一个扩展 Kernel32 的新接口(interface),以便添加缺少的功能?为什么从项目官网看,在他们的jar里面,有些功能是不存在的?

提前致谢

弗朗切斯科

最佳答案

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.

A:是的,MSDN图书馆网站是首选http://msdn.microsoft.com/en-us/library/default.aspx .但是,我不明白为什么你找不到其他人。如果您知道如何搜索它们,它就在那里。但是,有些功能可能并不容易,例如 COM 接口(interface),很难正确转换为 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常用功能的基本接口(interface),缺少的可能需要自己添加。

关于java - JNA 库,缺少 Windows 函数 : how to add new functions?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6957150/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com