Platform SDK: DLLs, Processes, and Threads |
The UnregisterWaitEx function cancels a registered wait operation issued by the RegisterWaitForSingleObject function.
BOOL UnregisterWaitEx( HANDLE WaitHandle, // wait handle HANDLE CompletionEvent // completion event );
If this parameter is not INVALID_HANDLE_VALUE, the function is non-blocking; it does not wait for all callback functions to complete. Otherwise, the function returns immediately.
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.
You cannot make a blocking call to UnregisterWaitEx from within a callback function.
After making non-blocking call, no new callback functions can be queued. However, there may be pending callback functions already queued to worker threads.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Synchronization Overview, Synchronization Functions, RegisterWaitForSingleObject, Thread Pooling