Opens a new RegistryKey that represents the requested key on a foreign machine.
[Visual Basic] Public Shared Function OpenRemoteBaseKey( _ ByVal hKey As RegistryHive, _ ByVal machineName As String _ ) As RegistryKey [C#] public static RegistryKey OpenRemoteBaseKey( RegistryHive hKey, string machineName ); [C++] public: static RegistryKey* OpenRemoteBaseKey( RegistryHive hKey, String* machineName ); [JScript] public static function OpenRemoteBaseKey( hKey : RegistryHive, machineName : String ) : RegistryKey;
The requested RegistryKey.
Exception Type | Condition |
---|---|
ArgumentException | if hKey is invalid or if machineName is not found. |
ArgumentNullException | if machine name is null. |
SecurityException | if the user does not have access. |
The local machine registry is opened if String.Empty is passed as the machine name.
RegistryKey Class | RegistryKey Members | Microsoft.Win32 Namespace