Re: How to send IRP_MN_QUERY_INTERFACE to the USB Port Driver?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I was confused by myself. First I thought I has to write a USB Host
Controller Interface Miniport Driver. (That's not possible anyway as MS
doesn't has opened some interfaces). Later I recognized that I have to
write a bus driver. Yes a bus driver, my driver. The plan is that I can
use an USB device, that is shared on a server, on my workstation. For
this I'm writing a bus driver that can 'put' several usb devices from
the network to the local workstation. So I have several devices at my
bus driver and windows should recognize them as usb devices as were
they attache locally (and therefore load the local usb client drivers).
So what im trying to tell is that this should be a virtual usb bus that
transfers the usb data packets over the network.
Now. The AddDevice is called in my driver when a network usb device
should be attached. But so far it is not connected with usb in any way.
so we're not on top of the usb stack. And therefore I can't send an IRP
'down'.
When I write a dummy usb client driver it would be on top of the stack.
And there i could send an IRP down. but this query interface irp will
be answered by the hub driver and not the port driver (right?) as the
hub is above the port.
I think i can't and i shouldn't call IoAttachDeviceToDeviceStack
because this driver should not be anywhere 'between' the usb stack. The
USB_BUS_INTERFACE_HUB_V5 contains a pointer to a method called
CreateUsbDevice. Thats my target. I think i can 'publish' a usb device
connected trough the network to the local system by calling this
CreateUsbDevice method. Somewhere near the bottom of the usb
driver?/device? stack is the usb port driver. this driver (above the
host controller miniport driver and below the usbhub driver) exports
this interface. But currently I'm not able to get a reference to this
usbport driver.
If I'm completly wrong and there is another way to tell windows that a
new usb device has arrived please tell me! :)

Thank you very much for your support!

.



Relevant Pages