Abstractions.WindowsApi.pInvokes.RegistryUnLoad C# (CSharp) Метод

RegistryUnLoad() публичный статический Метод

unload regfile from regkey
public static RegistryUnLoad ( structenums where, string name ) : Boolean
where structenums hklm or hku
name string
Результат Boolean
        public static Boolean RegistryUnLoad(structenums.RegistryLocation where, string name)
        {
            if (!SafeNativeMethods.RegistryLoadPrivilegeSet)
            {
                if (!RegistryLoadSetPrivilege())
                    return false;
            }

            int ret = SafeNativeMethods.RegUnLoadKey((uint)Enum.Parse(typeof(structenums.baseKey), where.ToString()), name);
            if (ret != 0)
            {
                LibraryLogging.Error("Unable to unload regkey {0} error:{1} {2}", name, ret, LastError(ret));
                return false;
            }
            return true;
        }