As I mentioned to Fabrizio, I have not gotten to the point in my application where I am investigating why my application hangs… as it does not do it very often… when I get to that point I will let you know what I find… currently I use GetDeviceCount to check if the device is there, before attempting a transmission. I checked to see how I could get ahold of the WM_DEVICECHANGE message, but it doesn’t seem to be present in any of my classes… an example would be much appreciated… perhaps it is something only provided in DDK? which I don’t have right now… Windows…
However, it looks that even if I get a WM_DEVICECHANGE, if the device driver locked up, there would be nothing to be done anyway, short of launching every device communication in it’s own thread, which can be shut down when the device fails…
Unfortunately I do not have access to your code. Thus I rely on you to produce a high quality product. It disturbs me, and makes me cringe, when I hear you say " the “right way” is often much more complicated than the simple examples provided" and “We avoided this complexity in our samples” and “for some programmers this is simply too complicated to follow” and “Done right, the PipeTest sample would include multi-threaded access” and “it’s more Microsoft’s charge to show examples of good OS programming”. No, this sounds like excuses to me. I believe there is room for showing simplified codeing methods, but I also believe you have a responsibility to teach and show the “right way” also.
To some of us this is not “toy programming”, it’s the real deal. So I would like to request that you give/make available the “Adult” version of the libraries for which we have no source code, provide full details concerning all the routines, including what they return, and create some meaningful, solid, “done right” examples…
I want to see a robust 20MB/s pipe in / out example based on the isochronous endpoint… that can handle down to 0 size packets when the fifo goes empty… and won’t hang when the power turns off… something that will truely report how many REAL bytes are transmitted (that won’t go and get bytes that arn’t there), something that returns ERROR CODES… and yes, passes down the WM_DEVICECHANGE, and perhaps handles the device threads for me, so I don’t have to go there myself… This is the sample I want to see… pipetest on steroids perhaps… use counters with different clock rates to demonstrate handling of fifo-full and fifo empty, without having the extra wire out with the data waiting count… and all the above features…
Oh, and don’t use types like std::strings, use char, it makes doing things easier when you are library limited, like in win32 DLL’s… and speaking of DLL’s can you tell me what type you are using?
Thanks…