If the function succeeds, the return value indicates the event that caused the function to return. It can be one of the following values:
WAIT_OBJECT_0: The state of the specified object is signaled.WAIT_TIMEOUT: The time-out interval elapsed.WAIT_ABANDONED: The specified object is a mutex, and the thread that owned the mutex has terminated without releasing it. The mutex is now abandoned and signaled.
If the function fails, the return value is WAIT_FAILED. To get extended error information, call GetLastError.