ole32: Cleanup return value handling in CoWaitForMultipleHandles.
This commit is contained in:
parent
75801f095d
commit
8c2a9414a6
|
@ -3646,29 +3646,20 @@ 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;
|
||||
default:
|
||||
*lpdwindex = res;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("Unexpected wait termination: %d, %d\n", res, GetLastError());
|
||||
hr = E_UNEXPECTED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
TRACE("-- 0x%08x\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue