public static void Register(Type t) { RegistryKey rk = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\" + t.Name); rk.SetValue(string.Empty, t.GUID.ToString("B").ToUpper()); rk.Close(); ShellInterop.SHChangeNotify(0x08000000, 0, IntPtr.Zero, IntPtr.Zero); }
public static void Unregister(Type t) { Registry.LocalMachine.DeleteSubKeyTree(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\" + t.Name); ShellInterop.SHChangeNotify(0x08000000, 0, IntPtr.Zero, IntPtr.Zero); }