From 0000fdb6953dc4e734d7541fa5fb4aca6c830021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joona=20Heikkil=C3=A4?= Date: Fri, 30 Mar 2018 14:56:35 +0300 Subject: [PATCH] Add notes about known RegConnectRegistry fails Add description about when RegConnectRegistry fails and which error codes it returns in those cases. --- .../src/com/sun/jna/platform/win32/Advapi32.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java b/contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java index 70e3776b24..88a5a6a7ea 100755 --- a/contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java @@ -878,8 +878,15 @@ int RegOpenKeyEx(HKEY hKey, String lpSubKey, int ulOptions, * identifying the predefined handle on the remote computer. * @return If the function succeeds, the return value is * {@link WinError#ERROR_SUCCESS}.
- * If the function fails, the return value is a nonzero error code - * defined in Winerror.h. You can use the + * If the remote computer cannot be found or if its Remote Registry + * service is disabled, the function fails and returns + * {@link WinError#ERROR_BAD_NETPATH}.
+ * If attempting to use a registry handle other than one of the + * three predefined handles, the function fails and returns + * {@link WinError#ERROR_INVALID_HANDLE}.
+ * If access to the registry is denied, the function fails and + * returns {@link WinError#ERROR_ACCESS_DENIED}.
+ * If the function fails for some other reason, you can use the * {@link Native#getLastError} method to get a generic description * of the error. * @see RegConnectRegistry function (Windows)