- n = MsgWaitForMultipleObjects(other_event ? 2 : 1, handles, FALSE, ticks,
+ handles = handle_get_events(&nhandles);
+ handles = sresize(handles, nhandles+2, HANDLE);
+ nallhandles = nhandles;
+
+ if (netevent != INVALID_HANDLE_VALUE)
+ handles[netindex = nallhandles++] = netevent;
+ else
+ netindex = -1;
+ if (other_event != INVALID_HANDLE_VALUE)
+ handles[otherindex = nallhandles++] = other_event;
+ else
+ otherindex = -1;
+
+ n = MsgWaitForMultipleObjects(nallhandles, handles, FALSE, ticks,