ISynchronize::Wait method (objidl.h)
Waits for the synchronization object to be signaled or for a specified timeout period to elapse, whichever comes first.
HRESULT Wait(
[in] DWORD dwFlags,
[in] DWORD dwMilliseconds
);
[in] dwFlags
The wait options. Possible values are taken from the COWAIT_FLAGS enumeration.
[in] dwMilliseconds
The time this call will wait before returning, in milliseconds. If this parameter is INFINITE, the caller will wait until the synchronization object is signaled, no matter how long it takes. If this parameter is 0, the method returns immediately.
This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_FAIL, as well as the following values.
Return code | Description |
---|---|
|
The synchronization object was signaled. |
|
The time-out period elapsed before the synchronization object was signaled. |
|
There is no synchronization object to wait on. |
If the caller is waiting in a single-thread apartment, Wait enters the COM modal loop. If the caller is waiting in a multithread apartment, the caller is blocked until Wait returns.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | objidl.h (include ObjIdl.h) |