|
From: Graeme G. <gr...@ar...> - 2010-04-27 03:57:48
|
Thought I'd summarise some of my recent discoveries with respect to
the MSWindows back end & libusb0.sys:
* CancelIoEx (used in poll_windows.c on Vista/Win7) seems to be unreliable
(at least with the libusb0.sys back end).
I've had to disable it in my code. I don't know why that is, although this
may be a hint: <http://msdn.microsoft.com/en-us/library/aa480216.aspx>
"Note that this does not guarantee that these requests will be honored by underlying
drivers. Drivers that can take a long time to complete create requests must implement
cancellation support. We developed driver I/O completion/cancellation guidelines as
well as a new option for Vista's driver verifier v2 to support testing completion and
cancellation behaviors (see Driver Hang Verifier in Related Links)."
* The original libusb0.sys has it's set config on start code commented
out for compatibility with running as a filter driver. This makes it
(and copies of it such as the signed ptlibusb0.sys) not work
with the MSWindows back end, since it assumes that the device has been
configured.
I had to introduce a patch to work around this problem, and get
the MSWindows back end working with the signed ptlibusb0.sys.
(patch is attached).
(The libusb0.sys created from the source of my mod. does do
a setconfig, so does work without a patch).
* The ptlibusb0.sys file itself isn't signed, so won't work
on its own with Vista/Win7 64 bit. This is because it's the catalog
file that comes with it that's signed. It turns out that
if you use that catalog file with the ptlibusb0.sys driver,
Vista/Win7 64 bit will load the driver, even though the
catalog signature doesn't match any of the the other files (.dll, .inf etc.).
(This seems an obscure fact about Microsoft's code signing).
Graeme Gill.
|