-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New FAQ entry on ASCII/Unicode functions in Windows #377
Comments
See also related Stack Overflow post with example: http://stackoverflow.com/q/26644491/398670 |
You should contribute this to the JNA documentation. |
This is useful, thanks. It’s preferable to use a combination of TypeMapper and FunctionMapper (see com.sun.jna.win32.W32APIOptions.DEFAULT_OPTIONS) so that you can leave off the “-A” or “-W” suffix (you never need to use both simultaneously) and use “String” rather than explicit “WString”. On Oct 29, 2014, at 11:10 PM, Craig Ringer [email protected] wrote:
|
Q: On Windows, MSDN shows that
TheFuncName
is insomelib.dll
but JNA throwsUnsatisifiedLinkError: The specified procedure could not be found
.A: Make sure you're on a version of Windows that contains the function.
A: Some windows functions are documented as
TheFuncName
but are actually implemented asTheFuncNameA
andTheFuncNameW
in the library. You can see this with Dependency Walker (depends.exe) from http://dependencywalker.com when you open the DLL. JNA won't automatically resolve the wide-string variant, so you should explicitly declare the wide-string name variant or use aFunctionMapper
likeW32APIFunctionMapper
.The text was updated successfully, but these errors were encountered: