| 
      
      
      From: Andrew X. <xi...@gr...> - 2006-06-19 19:58:58
      
     | 
| Stephan,
in usb_submit_async
   if(!DeviceIoControl(c->dev->impl_info,
                      c->control_code,
                      &c->req, sizeof(libusb_request),
                      c->bytes,
                      c->size, &ret, &c->ol))
    {
      if(GetLastError() != ERROR_IO_PENDING)
        {
          usb_error("usb_submit_async: submitting request failed, "
                    "win error: %s", usb_win_error_to_string());
           return -usb_win_error_to_errno();
        }
    }
  return ret;
ret has the bytes_read. however, the value got returned before the value is
updated. I think usb_submit_async should take a parameter in as a
&bytes_read.
-Andrew
----- Original Message ----- 
From: "Stephan Meyer" <ste...@we...>
To: <lib...@li...>; "Andrew Xiang"
<xi...@gr...>
Sent: Monday, June 19, 2006 12:44 PM
Subject: Re: [Libusb-win32-devel] win-libusb async read
>
> See
>
> http://sourceforge.net/mailarchive/message.php?msg_id=10083829
>
>
>
> > I got the simple bulk write/read to work. However, I would like to have
a
> > thread waiting on the read all the time and process the read data
> > independent of the write. How would I implement async read using the
libusb?
> > anyone has an example?
> >
> > thanks
> > Andrew
> >
> >
> >
> > _______________________________________________
> > Libusb-win32-devel mailing list
> > Lib...@li...
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
>
> ______________________________________________________________________
> XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
> Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
>
>
>
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
 |