Commit 8c2a9414 authored by Alexandre Julliard's avatar Alexandre Julliard

ole32: Cleanup return value handling in CoWaitForMultipleHandles.

parent 75801f09
......@@ -3646,28 +3646,19 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
(dwFlags & COWAIT_ALERTABLE) ? TRUE : FALSE);
}
if (res < WAIT_OBJECT_0 + cHandles)
{
/* handle signaled, store index */
*lpdwindex = (res - WAIT_OBJECT_0);
break;
}
else if (res == WAIT_TIMEOUT)
switch (res)
{
case WAIT_TIMEOUT:
hr = RPC_S_CALLPENDING;
break;
}
else if (res == WAIT_IO_COMPLETION)
{
*lpdwindex = WAIT_IO_COMPLETION;
case WAIT_FAILED:
hr = HRESULT_FROM_WIN32( GetLastError() );
break;
}
else
{
ERR("Unexpected wait termination: %d, %d\n", res, GetLastError());
hr = E_UNEXPECTED;
default:
*lpdwindex = res;
break;
}
break;
}
TRACE("-- 0x%08x\n", hr);
return hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment