def read_message_bytes_from_pipe(pipe_handle):
overlapped = OVERLAPPED()<EOL>overlapped.hEvent = create_event()<EOL>try:<EOL><INDENT>buff = create_string_buffer(BUFSIZE + <NUM_LIT:1>)<EOL>c_read = DWORD()<EOL>success = windll.kernel32.ReadFile(<EOL>pipe_handle,<EOL>buff,<EOL>DWORD(BUFSIZE),<EOL>byref(c_read),<EOL>byref(overlapped))<EOL>if success:<EOL><INDENT>buff[c_read.value] = b'<STR_LIT>'<EOL>raise Return(buff.value)<EOL><DEDENT>error_code = windll.kernel32.GetLastError()<EOL>if error_code == ERROR_IO_PENDING:<EOL><INDENT>yield From(wait_for_event(overlapped.hEvent))<EOL>success = windll.kernel32.GetOverlappedResult(<EOL>pipe_handle,<EOL>byref(overlapped),<EOL>byref(c_read),<EOL>BOOL(False))<EOL>if success:<EOL><INDENT>buff[c_read.value] = b'<STR_LIT>'<EOL>raise Return(buff.value)<EOL><DEDENT>else:<EOL><INDENT>error_code = windll.kernel32.GetLastError()<EOL>if error_code == ERROR_BROKEN_PIPE:<EOL><INDENT>raise BrokenPipeError<EOL><DEDENT>elif error_code == ERROR_MORE_DATA:<EOL><INDENT>more_data = yield From(read_message_bytes_from_pipe(pipe_handle))<EOL>raise Return(buff.value + more_data)<EOL><DEDENT>else:<EOL><INDENT>raise Exception(<EOL>'<STR_LIT>' % error_code)<EOL><DEDENT><DEDENT><DEDENT>elif error_code == ERROR_BROKEN_PIPE:<EOL><INDENT>raise BrokenPipeError<EOL><DEDENT>elif error_code == ERROR_MORE_DATA:<EOL><INDENT>more_data = yield From(read_message_bytes_from_pipe(pipe_handle))<EOL>raise Return(buff.value + more_data)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>' % error_code)<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>windll.kernel32.CloseHandle(overlapped.hEvent)<EOL><DEDENT>
(coroutine)
Read message from this pipe. Return bytes.