Game Development Reference
In-Depth Information
key.Close();
}
}
}
catch (Exception)
{
throw;
}
}
The UnregisterExtension() method is called to undo the registry changes applied
by the RegisterExtension() method.
protected static void UnregisterExtension(System.Type type,
string[] extensions,
string handlerName)
{
try
{
string guid = InterogateGuid(type);
if (guid.Length > 0)
{
RegistryKey key;
key = Registry.LocalMachine.OpenSubKey(“Software\\” +
“Microsoft\\” +
“Windows\\” +
“CurrentVersion\\” +
“Shell Extensions\\” +
“Approved”, true);
key.DeleteValue(guid);
key.Close();
foreach (string extension in extensions)
{
string path = String.Format(
“{0}\\shellex\\ContextMenuHandlers\\{1}”,
extension, handlerName)
Registry.ClassesRoot.DeleteSubKey();
}
}
}
Search Nedrilad ::




Custom Search