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, ...@@ -3646,28 +3646,19 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
(dwFlags & COWAIT_ALERTABLE) ? TRUE : FALSE); (dwFlags & COWAIT_ALERTABLE) ? TRUE : FALSE);
} }
if (res < WAIT_OBJECT_0 + cHandles) switch (res)
{
/* handle signaled, store index */
*lpdwindex = (res - WAIT_OBJECT_0);
break;
}
else if (res == WAIT_TIMEOUT)
{ {
case WAIT_TIMEOUT:
hr = RPC_S_CALLPENDING; hr = RPC_S_CALLPENDING;
break; break;
} case WAIT_FAILED:
else if (res == WAIT_IO_COMPLETION) hr = HRESULT_FROM_WIN32( GetLastError() );
{
*lpdwindex = WAIT_IO_COMPLETION;
break; break;
} default:
else *lpdwindex = res;
{
ERR("Unexpected wait termination: %d, %d\n", res, GetLastError());
hr = E_UNEXPECTED;
break; break;
} }
break;
} }
TRACE("-- 0x%08x\n", hr); TRACE("-- 0x%08x\n", hr);
return 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