FindNextChangeNotification

  BOOL FindNextChangeNotification(hChange)    
  HANDLE hChange; /* change notification handle to signal */

The FindNextChangeNotification function requests that a change notification handle be signaled the next time the system detects an appropriate change.

Parameters

hChange

Specifies a change notification handle created by the FindFirstChangeNotification function.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

Comments

Once this function returns successfully, the application can use the WaitForSingleObject or WaitForMultipleObjects function to wait for notification that a change has occurred.

If a change occurs between a call to the FindFirstChangeNotification function and a call to the FindNextChangeNotification function, Win32 remembers the change and it will immediately satisfy a wait for the change notification. For example:

FindFirstChangeNotification(h);

.

change occurs here

.

FindNextChangeNotification(h);

WaitForSingleObject(h, -1); /* returns immediately */

If an application calls this function with a change request outstanding, it may miss a change notification. For example, the following code may miss a change:

.

.

FindNextChangeNotification(h);

FindNextChangeNotification(h);

WaitForSingleObject(h, -1);

.

.

When hChange is no longer needed, it should be closed with the FindCloseChangeNotification function.

See Also

FindCloseChangeNotification, FindFirstChangeNotification, WaitForSingleObject, WaitForMultipleObjects