Cancels a registered wait operation issued by the RegisterWaitForSingleObject function.
To use a completion event, call the UnregisterWaitEx function.
BOOL UnregisterWait( HANDLE WaitHandle );
The wait handle. This handle is returned by the RegisterWaitForSingleObject function.
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.
If any callback functions associated with the timer have not completed when UnregisterWait is called, UnregisterWait unregisters the wait on the callback functions and fails with the ERROR_IO_PENDING error code. The error code does not indicate that the function has failed, and the function does not need to be called again. If your code requires an error code to set only when the unregister operation has failed, call UnregisterWaitEx instead.
To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||winbase.h (include Windows.h)|