Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UnregisterWait function

Cancels a registered wait operation issued by the RegisterWaitForSingleObject function.

To use a completion event, call the UnregisterWaitEx function.

Syntax


BOOL WINAPI UnregisterWait(
  _In_ HANDLE WaitHandle
);

Parameters

WaitHandle [in]

The wait handle. This handle is returned by the RegisterWaitForSingleObject 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

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

RegisterWaitForSingleObject
Synchronization Functions
Thread Pooling
UnregisterWaitEx

 

 

Show:
© 2017 Microsoft