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