<p>What is the return value of the <code>WaitForObject()</code> function?</p>
<p>I do not mean the type of return value (int).</p>
<p>What does it return if the event is signalled and what does it return if the event is not signalled?</p>

There is no
```
WaitForObject
```
function. I assume that you mean either
```
WaitForSingleObject
```
or
```
WaitForMultipleObjects
```
.
```
WaitForSingleObject
```
will return
```
WAIT_TIMEOUT
```
,
```
WAIT_OBJECT_0
```
or
```
WAIT_ERROR
```
.
```
WaitForMultipleObjects
```
will return
```
WAIT_TIMEOUT
```
,
```
WAIT_OBJECT_0 + n
```
(where n is the index to the object in the array) or
```
WAIT_ERROR
```
.