packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/Shell/ShellObjectWatcher/ShellObjectWatcher.cs
/// <summary>
/// Start the watcher and begin receiving change notifications.        
/// <remarks>
/// If the watcher is running, has no effect.
/// Registration for notifications should be done before this is called.
/// </remarks>
/// </summary>
Start the watcher and begin receiving change notifications.

If the watcher is running, has no effect.
Registration for notifications should be done before this is called.
Start the watcher and begin receiving change notifications . If the watcher is running has no effect . Registration for notifications should be done before this is called .
public void Start()
        {
            if (Running) { return; }
            #region Registration
            ShellNativeMethods.SHChangeNotifyEntry entry = new ShellNativeMethods.SHChangeNotifyEntry();
            entry.recursively = _recursive;
            entry.pIdl = _shellObject.PIDL;
            _registrationId = ShellNativeMethods.SHChangeNotifyRegister(
                _listenerHandle,
                ShellNativeMethods.ShellChangeNotifyEventSource.ShellLevel | ShellNativeMethods.ShellChangeNotifyEventSource.InterruptLevel | ShellNativeMethods.ShellChangeNotifyEventSource.NewDelivery,
                 _manager.RegisteredTypes, 
                _message,
                1,
                ref entry);
            if (_registrationId == 0)
            {
                throw new Win32Exception(LocalizedMessages.ShellObjectWatcherRegisterFailed);
            }
            #endregion
            Running = true;
        }
public void Start ( ) { if ( Running ) { return ; } region  Registration ShellNativeMethods . SHChangeNotifyEntry entry = new ShellNativeMethods . SHChangeNotifyEntry ( ) ; entry . recursively = _recursive ; entry . pIdl = _shellObject . PIDL ; _registrationId = ShellNativeMethods . SHChangeNotifyRegister ( _listenerHandle , ShellNativeMethods . ShellChangeNotifyEventSource . ShellLevel | ShellNativeMethods . ShellChangeNotifyEventSource . InterruptLevel | ShellNativeMethods . ShellChangeNotifyEventSource . NewDelivery , _manager . RegisteredTypes , _message , 1 , ref entry ) ; if ( _registrationId == 0 ) { throw new Win32Exception ( LocalizedMessages . ShellObjectWatcherRegisterFailed ) ; } endregion Running = true ; }
Start the watcher and begin receiving change notifications.
Start the watcher and begin receiving change notifications .
//ShellObjectChangeTypes.AllEventsMask,