Commit b114bd07 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

kernel32: Wait on pipe handle in ConnectNamedPipe if needed.

parent 5a675ea4
......@@ -1681,6 +1681,11 @@ BOOL WINAPI ConnectNamedPipe(HANDLE hPipe, LPOVERLAPPED overlapped)
status = NtFsControlFile(hPipe, overlapped ? overlapped->hEvent : NULL, NULL, cvalue,
overlapped ? (IO_STATUS_BLOCK *)overlapped : &status_block,
FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0);
if (status == STATUS_PENDING && !overlapped)
{
WaitForSingleObject(hPipe, INFINITE);
status = status_block.u.Status;
}
if (status == STATUS_SUCCESS) return TRUE;
SetLastError( RtlNtStatusToDosError(status) );
......
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