/// <summary> /// Open the specified subkey. /// </summary> public static RegistryKeyHandle OpenKey( RegistryKeyHandle key, string subKeyName, RegistryAccessRights rights = RegistryAccessRights.KEY_READ) { WindowsError result = Imports.RegOpenKeyExW(key, subKeyName, 0, rights, out RegistryKeyHandle subKey); if (result != WindowsError.ERROR_SUCCESS) { throw Errors.GetIoExceptionForError(result); } return(subKey); }
public static extern WindowsError RegOpenKeyExW( RegistryKeyHandle hKey, string lpSubKey, uint ulOptions, RegistryAccessRights samDesired, out RegistryKeyHandle phkResult);