INtime SDK Help
WaitForSingleObject, RtWaitForSingleObject (iwin32)
INtime SDK v7.1 > About INtime > Alternate APIs > iwin32 API > iwin32 API > WaitForSingleObject, RtWaitForSingleObject (iwin32)

Waits until either the specified object is in the signaled state, or until the time-out interval elapses.

DWORD WaitForSingleObject(
    HANDLE hHandle,
    DWORD dwMilliseconds

DWORD RtWaitForSingleObject(
    HANDLE hHandle,
    DWORD dwMilliseconds


Handle to the object. For a list of object types whose handles can be specified, see the Remarks section.
Specifies the time-out interval, in milliseconds. If the interval elapses, the function returns, even if the object's state is nonsignaled. If dwMilliseconds is zero, the function tests the object's state and returns immediately. If dwMilliseconds is INFINITE, the function's time-out interval never elapses.


These functions cannot be called from a pure INtime thread.

The handle can refer to an object of the following type:

You can also use RtWaitForSingleObject from a Windows application to wait for an iwin32 object. In that environment, when a mutex causes a change in a thread's priority, the thread is part of the iwin32x proxy; it is not the Windows thread!

Return Values

WAIT_OBJECT_0 Success. The specified object's state is signaled.
WAIT_ABANDONED_0 Success. The specified object was deleted while waiting.
WAIT_TIMEOUT Success. The time-out interval elapsed, and the object's state is nonsignaled.
WAIT_FAILED Failure. Waiting on an invalid handle causes this function to return WAIT_FAILED.

For extended error information, see GetLastError.


Versions Defined in Include Link to
INtime 3.0 intime/rt/include/iwin32.h


See Also

PulseEvent, ResetEvent, SetEvent, WaitForMultipleObjects, iwin32 API, iwin32 Overview