Notification sent to the view callback object to specify the locations and events that should be registered for change notification events. Once they are registered, when a change occurs in on of these locations or events, the view callback object is notified. These events are sent to the view callback through SFVM_FSNOTIFY and are then handled by the view.


    wParam = (WPARAM)(LPITEMIDLIST*) pidl;

    lParam = (LPARAM)(LONG*) lEvents;



pidl [out]

A pointer to an absolute IDList of an item for which the view should register to be notified of changes. Typically, this is the same as the IDList of the location being viewed, but it can be another location.

Important  The lifetime of this value is owned by the view callback object. It is the responsibility of the view callback object to create and then free this value when it is no longer needed. This requires that the view callback object stores this value. Usually, the value can be stored in the _pidlMonitor member of the view callback object. The ownership rules for the value returned through pidl are nonstandard and require special care. The view callback object must own this value and ensure that it is not freed until the view callback object itself is destroyed.
lEvents [out]

A value that contains one or more SHCNE values. See SHChangeNotify for a list of possible values. The view callback object will register to receive an SFVM_FSNOTIFY message when any of the associated events occurs.

Return value

Ignored, but should return S_OK.


If this callback message does not return a nonzero value for either the IDList or the events mask then the view will not register for change notifications.


The following sample shows an example implementation of the view callback function's handler code for SFVM_GETNOTIFY.

  *((LPITEMIDLIST*)wParam) = _pidl;    // Pass a reference whose lifetime this 
                                       // class is responsible for.
  *((LONG*)lParam) = SHCNE_DISKEVENTS; // A combination of all of the 
                                       // disk event identifiers.
   return S_OK;


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]



See also