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