@@ -854,6 +854,39 @@ boolean GetTokenInformation(HANDLE tokenHandle,
854
854
int RegOpenKeyEx (HKEY hKey , String lpSubKey , int ulOptions ,
855
855
int samDesired , HKEYByReference phkResult );
856
856
857
+ /**
858
+ * Establishes a connection to a predefined registry key on another
859
+ * computer.
860
+ * @param lpMachineName
861
+ * The name of the remote computer. The string has
862
+ * the following form:<br />
863
+ * <pre><code>\\computername</code></pre>
864
+ * The caller must have access to the remote computer or the
865
+ * function fails.<br />
866
+ * If this parameter is <c>null</c>, the local computer name
867
+ * is used.
868
+ * @param hKey
869
+ * A predefined registry handle. This parameter can be one of
870
+ * the following predefined keys on the remote computer.<br />
871
+ * <ul>
872
+ * <li>{@link WinReg#HKEY_LOCAL_MACHINE}</li>
873
+ * <li>{@link WinReg#HKEY_PERFORMANCE_DATA}</li>
874
+ * <li>{@link WinReg#HKEY_USERS}</li>
875
+ * </ul>
876
+ * @param phkResult
877
+ * A pointer to a variable that receives a key handle
878
+ * identifying the predefined handle on the remote computer.
879
+ * @return If the function succeeds, the return value is
880
+ * {@link WinError#ERROR_SUCCESS}.<br />
881
+ * If the function fails, the return value is a nonzero error code
882
+ * defined in Winerror.h. You can use the
883
+ * {@link Native#getLastError} method to get a generic description
884
+ * of the error.
885
+ * @see <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724840.aspx">RegConnectRegistry function (Windows)</a>
886
+ * @see <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724836.aspx">Predefined Keys (Windows)</a>
887
+ */
888
+ int RegConnectRegistry (String lpMachineName , HKEY hKey , HKEYByReference phkResult );
889
+
857
890
/**
858
891
* The RegQueryValueEx function retrieves the type and data for a specified
859
892
* value name associated with an open registry key.
0 commit comments