INtime SDK Help
RtWaitForMultipleObjects (iwin32x)
INtime SDK v6 > About INtime > Alternate APIs > iwin32 API > iwin32x API > RtWaitForMultipleObjects (iwin32x)

Waits until one of the specified objects is in the signaled state, or until the time-out interval elapses.

DWORD RtWaitForMultipleObjects(
    DWORD nCount,
    CONST HANDLE * lpHandles,
    BOOLEAN bWaitAll,
    DWORD dwMilliseconds
);

Parameters

nCount
Specifies the number of object handles in the array pointed to by lpHandles. The maximum number of object handles is MAXIMUM_WAIT_OBJECTS which, in INtime, is 16.
lpHandles
Pointer to an array of object handles. For a list of object types whose handles can be specified, see the Remarks section. The array can contain handles of objects of different types.
bWaitAll
Specifies the wait type. This parameter must be set to FALSE. This causes the function to return when the state of any of the objects set to is signaled. The return value indicates the object whose state caused the function to return.
dwMilliseconds
Specifies the time-out interval in milliseconds. If the interval elapses, the function returns, even if the conditions specified by the bWaitAll parameter are not met. If dwMilliseconds is zero, the function tests the states of specified objects and returns immediately. If dwMilliseconds is INFINITE, the function's time-out interval never elapses.

Remarks

When one object is deleted while the thread waits, the thread wakes and ERROR_INVALID_HANDLE is set.

This function cannot be called from a pure INtime thread.

WaitForMultipleObjects can specify handles of any of the following object types in the lpHandles array:

Return Values

WAIT_OBJECT_0 to (WAIT_OBJECT_0 + nCount -1) Success. The return value minus WAIT_OBJECT_0 indicates the lpHandles array index of the object that satisfied the wait. If more than one object became signaled during the call, this is the array index of the first signaled object.
WAIT_ABANDONED_0 to (WAIT_ABANDONED_0 + nCount -1) Success. The return value minus WAIT_ABANDONED_0 indicates the lpHandles array index of the object that was deleted while waiting.
WAIT_TIMEOUT Success. The time-out interval elapsed and the condition specified by the fWaitAll parameter is not satisfied.
WAIT_FAILED Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 iwin32x.h iwin32x.h iwin32x.lib

Notes

See Also

iwin32x API, iwin32 Overview