Skip to content

Commit

Permalink
Add notes about known RegConnectRegistry fails
Browse files Browse the repository at this point in the history
Add description about when RegConnectRegistry fails and which error
codes it returns in those cases.
  • Loading branch information
cxcorp committed Mar 30, 2018
1 parent 8f8d925 commit 0000fdb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}.<br />
* 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}.<br />
* 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}.<br />
* If access to the registry is denied, the function fails and
* returns {@link WinError#ERROR_ACCESS_DENIED}. <br />
* 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 <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724840.aspx">RegConnectRegistry function (Windows)</a>
Expand Down

0 comments on commit 0000fdb

Please sign in to comment.