本文整理汇总了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);
}
}
}