public RegistryKey OpenRemoteBaseKey(RegistryHive hKey, string machineName)
{
IntPtr hKey2 = new IntPtr((int)hKey);
IntPtr keyHandle;
int num = Win32RegistryApi.RegConnectRegistry(machineName, hKey2, out keyHandle);
if (num != 0)
{
this.GenerateException(num);
}
return(new RegistryKey(hKey, keyHandle, true));
}