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

GetHandle() static private méthode

static private GetHandle ( RegistryKey key ) : IntPtr
key RegistryKey
Résultat System.IntPtr
		static IntPtr GetHandle (RegistryKey key)
		{
			return (IntPtr) key.Handle;
		}

Usage Example

        public string[] GetSubKeyNames(RegistryKey rkey)
        {
            IntPtr        handle        = Win32RegistryApi.GetHandle(rkey);
            StringBuilder stringBuilder = new StringBuilder(1024);
            ArrayList     arrayList     = new ArrayList();
            int           num           = 0;

            for (;;)
            {
                int num2 = Win32RegistryApi.RegEnumKey(handle, num, stringBuilder, stringBuilder.Capacity);
                if (num2 == 0)
                {
                    arrayList.Add(stringBuilder.ToString());
                    stringBuilder.Length = 0;
                }
                else
                {
                    if (num2 == 259)
                    {
                        break;
                    }
                    this.GenerateException(num2);
                }
                num++;
            }
            return((string[])arrayList.ToArray(typeof(string)));
        }
All Usage Examples Of Microsoft.Win32.Win32RegistryApi::GetHandle