Microsoft.Win32.RegistryKey.GetValueKindCore C# (CSharp) 메소드

GetValueKindCore() 개인적인 메소드

private GetValueKindCore ( string name ) : RegistryValueKind
name string
리턴 RegistryValueKind
        private RegistryValueKind GetValueKindCore(string name)
        {
            int type = 0;
            int datasize = 0;
            int ret = Interop.Advapi32.RegQueryValueEx(_hkey, name, null, ref type, (byte[])null, ref datasize);
            if (ret != 0)
            {
                Win32Error(ret, null);
            }

            return
                type == Interop.Advapi32.RegistryValues.REG_NONE ? RegistryValueKind.None :
                !Enum.IsDefined(typeof(RegistryValueKind), type) ? RegistryValueKind.Unknown :
                (RegistryValueKind)type;
        }