NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

RegistryKey.OpenRemoteBaseKey

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;

Parameters

hKey
HKEY to open. Provided by Win32.Registry class.
machineName
[To be supplied.]

Return Value

The requested RegistryKey.

Exceptions

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.

Remarks

The local machine registry is opened if String.Empty is passed as the machine name.

See Also

RegistryKey Class | RegistryKey Members | Microsoft.Win32 Namespace