简体   繁体   中英

JNA library, missing Windows function: how to add new functions?

i've a question about Java and jna library. I've downloaded the two jar ( jna.jar and platform.jar ) from java.net.

In the package com.sun.jna.platform.win32 there are already some defined interfaces that link the win dll, but in the Kernel32 file, a function is missing, the function is DeviceIoControl .

My questions are:

  1. 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.

  2. 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?

Thanks to all in advance

Francesco

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: Yes, MSDN library website is the preferred choice http://msdn.microsoft.com/en-us/library/default.aspx . But, I don't get it why you cannot find the others. It is completely all there if you know how to search for them. But, some functions may not be easy like COM interfaces which are difficult to be translated properly into JNA version.

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?

A: Yes, it is likely. JNA Win32 platform in the current form only provides basic interfaces to Kernel32 common functions, you may need to add your own for the missing ones.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM