Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Waits for any synchronization object in the container to be signaled or for a specified timeout period to elapse, whichever comes first.
Syntax
HRESULT WaitMultiple(
[in] DWORD dwFlags,
[in] DWORD dwTimeOut,
[out] ISynchronize **ppSync
);
Parameters
[in] dwFlags
The wait options. Possible values are taken from the COWAIT_FLAGS enumeration. COWAIT_WAITALL is not a valid setting for this method.
[in] dwTimeOut
The time this call will wait before returning, in milliseconds. If this parameter is INFINITE, the caller will wait until a synchronization object is signaled, no matter how long it takes. If this parameter is 0, the method returns immediately.
[out] ppSync
A pointer to an ISynchronize interface pointer on the synchronization object that was signaled. This parameter cannot be NULL.
Return value
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 are no synchronization objects in the container. |
Remarks
If the caller is waiting in a single-thread apartment, WaitMultiple enters the COM modal loop. If the caller is waiting in a multithread apartment, the caller is blocked until WaitMultiple returns.
Requirements
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) |