本文整理匯總了C#中Microsoft.Win32.RegistryKey.OpenSubKeyDeletion方法的典型用法代碼示例。如果您正苦於以下問題:C# RegistryKey.OpenSubKeyDeletion方法的具體用法?C# RegistryKey.OpenSubKeyDeletion怎麽用?C# RegistryKey.OpenSubKeyDeletion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.Win32.RegistryKey
的用法示例。
在下文中一共展示了RegistryKey.OpenSubKeyDeletion方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: unregisterTypeLib
protected void unregisterTypeLib(RegistryKey classes, ITypeLibAttributes reg)
{
using (classes)
{
using (RegistryKey tlbKey = classes.OpenSubKeyDeletion(TYPE_LIB))
{
if (tlbKey != null) //NOTE: to be safe if can happen clean machine without any user specific installation
tlbKey.DeleteSubKeyTree(reg.Guid.ToRegistry(), false);
}
}
}
示例2: unregisterInProcServer
protected static void unregisterInProcServer(RegistryKey classes, ComClassInfo reg)
{
using (classes)
{
using (RegistryKey clsidKey = classes.OpenSubKeyDeletion(CLSID))
{
if (clsidKey != null) //NOTE: to be safe if can happen clean machine without any user specific installation
clsidKey.DeleteSubKeyTree(reg.Guid, false);
}
classes.DeleteSubKeyTree(reg.ProgId, false);
}
}
示例3: unregisterInterface
protected void unregisterInterface(RegistryKey classes, ComInterfaceInfo reg)
{
using (classes)
{
using (RegistryKey interfaceKey = classes.OpenSubKeyDeletion(INTERFACE))
{
if (interfaceKey != null) //NOTE: to be safe if can happen clean machine without any user specific installation
interfaceKey.DeleteSubKeyTree(reg.Guid, false);
}
}
}