WriteFile(...) to USB HID: why does this call hang my client application ?

Discussion in 'Windows Vista Drivers' started by Ivan Vecerina, Jul 2, 2003.

  1. Hi,
    I'm experimenting with some home-made HID-class USB device.
    All is well with the ReadFile calls to read report.
    The queuing and blocking mechanism is clear to me.

    But I'm stumbling with some issues when sending
    reports with WriteFile. I never get any error
    results ( WriteFile() returns a non-zero value ),
    but sometimes the call just doesn't return,
    and requires me to kill my application.

    Any idea why this would be happening ?

    Reducing the frequency of calls to WriteFile seemed
    to help a bit, but did not solve the issue.
    My calls to WriteFile always follow a successful
    call to ReadFile, and I do not see what else I
    could/need to do to avoid overflowing the output queue.
    So what is going wrong ?

    Any idea about something I could be trying ?


    Thanks in advice for any hint or directions,
    Ivan

    NB: I'm running Win2k SP 3
     
    Ivan Vecerina, Jul 2, 2003
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.