Michal Vodicka wrote:
> Could you state what is so miserable about [BulkUSM sample]
Shortly, almost everything 
I don’t remember all problems as I had to rewrite at least half of code
within past years and my memory leaks quickly. So only imcomplete list:
Thanks! That’s a good list of pointers (what to look for) and arguments
(why it needs replacement).
> IMHO if it is so miserable, MS should replace it […]
They already did. There is KMDF sample available and I doubt they’ll
rewrite WDM samples.
Understood. Unfortunately, as KMDF is closed-source, AFAIK there is no
public source code available that shows how to properly handle the
issues that were pointed out for BulkUSB. (Pointers welcome!)
We use UsbScan for legacy OSes (w9x and w2k) and WDM driver for
everything else.
Currently, I have one WDM driver for everything. Saves a lot of
headache. The problems of the last USB support incidents were
predominantly problems with 82801 chips. (Oh, and one customer whose USB
port actually stopped supporting USB2.0 at all.) No driver issues. 
WDM driver could be replaced with both UMDF and KMDF versions.
For XP/Vista I also could replace our driver with a UMDF version.
But it (a) would be slower and (b) I would have to go back to different
install packages for different platforms again. Not inviting.
WinUsb itself is as fast as WDM driver so
UMDF driver using it can be as fast as your app using WDM driver.
Thanks, that’s interesting news! I’ll definitely look into direct
App<->WinUSB communication then, without any additional driver.
If you move your user mode app/library inside UMDF driver
and export different interface, performance can be comparable.
Unfortunately not for our protocol/requirements.
(Of course it is theoretically possible, but I would end up with 90% of
the application inside the UMDF driver. Better not.)
The second possibility is to use KMDF driver instead of WDM.
As stated - if I could, I’d rather do completely without any driver.
(Like we do in the Linux version of our software.)
So I’ll monitor WinUSB as a (probably good) option for the future.
Best regards, and many thanks for the pointers,
Hagen