public NotificationWindow(ShellNotificationListener parent) { SHChangeNotifyEntry notify = new SHChangeNotifyEntry(); notify.pidl = ShellItem.Desktop.Pidl; notify.fRecursive = true; m_NotifyId = Shell32.SHChangeNotifyRegister(this.Handle, SHCNRF.InterruptLevel | SHCNRF.ShellLevel, SHCNE.ALLEVENTS, WM_SHNOTIFY, 1, ref notify); m_Parent = parent; }
public NotificationWindow(ShellNotificationListener parent) { var notify = new SHChangeNotifyEntry { pidl = ShellItem.Desktop.Pidl, fRecursive = true }; _mNotifyId = Shell32.SHChangeNotifyRegister(Handle, SHCNRF.InterruptLevel | SHCNRF.ShellLevel, SHCNE.ALLEVENTS, WmShnotify, 1, ref notify); _mParent = parent; }