FindNextChangeNotification function
Applies to: desktop apps only
Requests that the operating system signal a change notification handle the next time it detects an appropriate change.
Syntax
BOOL WINAPI FindNextChangeNotification( __in HANDLE hChangeHandle );
Parameters
- hChangeHandle [in]
-
A handle to a change notification handle created by the FindFirstChangeNotification function.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
After the FindNextChangeNotification function returns successfully, the application can wait for notification that a change has occurred by using the wait functions.
If a change occurs after a call to FindFirstChangeNotification but before a call to FindNextChangeNotification, the operating system records the change. When FindNextChangeNotification is executed, the recorded change immediately satisfies a wait for the change notification.
FindNextChangeNotification should not be used more than once on the same handle without using one of the wait functions. An application may miss a change notification if it uses FindNextChangeNotification when there is a change request outstanding.
When hChangeHandle is no longer needed, close it by using the FindCloseChangeNotification function.
Examples
For an example, see Obtaining Directory Change Notifications.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 4/17/2012
dwWaitStatus = WaitForMultipleObjects(2, dwChangeHandles, FALSE, 500);
2. Replace the the WAIT_TIMEOUT branch, doing a silly call to FindNextChangeNotification()
case WAIT_TIMEOUT:
// A timeout occurred
printf("\nNo changes in the timeout period.\n");
if (FindNextChangeNotification(dwChangeHandles[1]) )
{
printf("\n done waste full FindNextChangeNotification() call!\n");
}else{
printf("\n ERROR: FindNextChangeNotification function failed.\n");
ExitProcess(GetLastError());
}
break;
- 9/16/2009
- MartinNvP