A proxy method throws a java.lang.UnsatisfiedLinkError with the message "Error looking up function ... The specified procedure could not be found." If this error occurs check the spelling of the function name, and verify that the "function" is not actually a macro. The Windows API DLLs contain quite a few such macros (e.g. GetMessage(), defined in Winuser.h), so read the DLL's documentation (and the associated header files) carefully. Macro names must be translated manually.
发布评论
评论(1)
请看 http://today.java.net/article/2009/11/11/simplify-native-code-access-jna
A proxy method throws a
java.lang.UnsatisfiedLinkError
with the message "Error looking up function ... The specified procedure could not be found." If this error occurs check the spelling of the function name, and verify that the "function" is not actually a macro. The Windows API DLLs contain quite a few such macros (e.g. GetMessage(), defined in Winuser.h), so read the DLL's documentation (and the associated header files) carefully. Macro names must be translated manually.