Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Re: WriteFile(...) to USB HID: why does this call hang my client application ?

Reply
Thread Tools Display Modes

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

 
 
Ivan Vecerina
Guest
Posts: n/a

 
      07-03-2003
"Robert Marquardt" <> wrote in message
news:...
| > 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 ?
|
| Try using separate file handles for read and write.

Thanks for the tip.
I tried using a separate Handle for input and output
(from two calls to CreateFile). But no luck.

The USB device receives a first series of Reports,
but then the PC client enters a deadlock. I pause
the client in the debugger and get the message:
The process appears to be deadlocked
(or is not running any user-mode code).
All threads have been stopped.
I only have 1 thread, which is blocked on a call
to WriteFile which never does return.

Any other idea/suggestion ?



tia
--
Ivan Vecerina, Dr. med. <> http://www.post1.com/~ivec



 
Reply With Quote
 
 
 
 
Robert Marquardt
Guest
Posts: n/a

 
      07-03-2003
Ivan Vecerina wrote:

> I only have 1 thread, which is blocked on a call
> to WriteFile which never does return.


Blocking on WriteFile for USB is strange indeed.
It may be a bad driver. For now i have no further help to offer.

 
Reply With Quote
 
Ivan Vecerina
Guest
Posts: n/a

 
      07-09-2003
"Robert Marquardt" <> wrote in message
news:...
| Ivan Vecerina wrote:
|
| > I only have 1 thread, which is blocked on a call
| > to WriteFile which never does return.
|
| Blocking on WriteFile for USB is strange indeed.
| It may be a bad driver. For now i have no further help to offer.

I was able to trace the problem down to our custom USB device,
which failed to reply(acknowledge) the output report it received.

I still find it disturbing, though, that the WriteFile call just
hangs and never returns (Win2k SP4) -- instead of reporting
an error after some timeout...

Issue solved now anyway.

Many thanks for your advice !
Ivan

--
http://www.post1.com/~ivec


 
Reply With Quote
 
Robert Marquardt
Guest
Posts: n/a

 
      07-14-2003
Ivan Vecerina wrote:

> I was able to trace the problem down to our custom USB device,
> which failed to reply(acknowledge) the output report it received.
>
> I still find it disturbing, though, that the WriteFile call just
> hangs and never returns (Win2k SP4) -- instead of reporting
> an error after some timeout...


You expect here too much from software. Handling a hardware failure is
not an easy task.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application hang Jonny Bergdahl Windows Vista Mail 6 09-25-2008 09:54 PM
appdata-local-Application Data-Application Data-Application Data infinitum ad nauseum. WHY keepout@yahoo.com.invalid Windows Vista General Discussion 16 09-16-2007 12:50 AM
Application Event 1530 causes system to hang or randonly reboot paximus Windows Vista Performance 0 04-18-2007 06:38 PM
32bit client application doesn't run using Vista Morejunie Windows Vista General Discussion 1 03-21-2007 01:48 AM
WriteFile(...) to USB HID: why does this call hang my client application ? Ivan Vecerina Windows Vista Drivers 0 07-02-2003 06:47 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59