'Return the result from the overlapped structure.
If there is no pending read operation, this function will return
immediately. This call will return False if the reading operation
has not completed yet and the read operation is still in progress.
Otherwise, it will return the result.
:param from_namedpipe: boolean representing from where to read
True = the function reads from the named pipe handle
False = he function reads from the file handle'

def get_read_result(self, from_namedpipe=True):

    if (not self._read_pending):
        return
    handle_to_read = (self.namedpipe if from_namedpipe else self._npipe_file)
    try:
        nBytesRead = ovs_winutils.get_overlapped_result(handle_to_read, self._read, False)
        self._read_pending = False
        return ovs_winutils.get_decoded_buffer(self._read_buffer[:nBytesRead])
    except ovs_winutils.pywintypes.error as e:
        if (e.winerror == ovs_winutils.winerror.ERROR_IO_INCOMPLETE):
            self._read_pending = True
            return False
        else:
            raise NamedPipeException(("Could    not    get    the    overlapped    result.    Error:    '%s'" % e.strerror), e.winerror)
