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); } } } }
protected void registerTypeLib(RegistryKey classes, ITypeLibAttributes reg) { using (classes) { using (RegistryKey tlbKey = classes.CreateSubKey(TYPE_LIB)) { using (RegistryKey guidKey = tlbKey.CreateSubKey(reg.Guid.ToRegistry())) { using (RegistryKey verKey = guidKey.CreateSubKey(reg.Version.ToString())) { //TODO: verKey.SetValue("", contnet of AssemblyDescriptionAttr); //TODO: are any flags needed? //using (RegistryKey flags = verKey.CreateSubKey("FLAGS")){ //flags.SetValue("","0"); //} } } } } }
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); } } }