diff --git a/CHANGES.md b/CHANGES.md index 4396c3260..192a84342 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,7 @@ Bug Fixes --------- * [#1644](https://github.com/java-native-access/jna/issues/1644): Fix bug in VARDESC and TYPEDESC causing an illegal memory access - [@lwahonen](https://github.com/lwahonen) * [#1715](https://github.com/java-native-access/jna/pull/1715): Fix `UdevDevice.getSysname()` calling `udev_device_get_syspath` instead of `udev_device_get_sysname` - [@dbwiddis](https://github.com/dbwiddis). +* [#1721](https://github.com/java-native-access/jna/pull/1721): Fix switched `serverName`/`domainName` arguments in `Netapi32Util#getDCName` - [@dbwiddis](https://github.com/dbwiddis). Release 5.18.1 ============== diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java index 8a6488ba4..55fe2340a 100644 --- a/contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java @@ -118,7 +118,7 @@ public static String getDCName() { public static String getDCName(String serverName, String domainName) { PointerByReference bufptr = new PointerByReference(); try { - int rc = Netapi32.INSTANCE.NetGetDCName(domainName, serverName, bufptr); + int rc = Netapi32.INSTANCE.NetGetDCName(serverName, domainName, bufptr); if (LMErr.NERR_Success != rc) { throw new Win32Exception(rc); }