Microsoft.Win32.Win32RegistryApi.RegConnectRegistry C# (CSharp) Méthode

RegConnectRegistry() private méthode

private RegConnectRegistry ( string machineName, IntPtr hKey, IntPtr &keyHandle ) : int
machineName string
hKey System.IntPtr
keyHandle System.IntPtr
Résultat int
		static extern int RegConnectRegistry (string machineName, IntPtr hKey,
				out IntPtr keyHandle);

Usage Example

        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));
        }