-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Version
Description
In the class com.sun.jna.platform.win32.Netapi32Util
the method getDCName(String, String)
seems to have accidentally (?) switched arguments:
It calls Netapi32#NetGetDCName
with (domainName, serverName, ...)
but that method expects (String serverName, String domainName, ...)
(which is also the signature of the native Windows function it seems).
int rc = Netapi32.INSTANCE.NetGetDCName(domainName, serverName, bufptr); |
Maybe this hasn't been noticed yet because the method seems to only be used within JNA with (null, null)
as arguments so it would not detect switched arguments. A search on GitHub doesn't show any usages of Netapi32Util#getDCName
outside of JNA either.
Unfortunately I am neither familiar enough with this project nor with the native Windows function to verify this.
Hopefully this information is useful nonetheless, but feel free to close this issue if you don't think it is useful.