I lost a huge post I was typing up due to one of the very crashes I was going to ask about, so I will try to keep this shorter unless anyone has time to help and needs more information.
I am working on a USB kernel filter driver extending a closed-source device driver, using the WDF USB API to make my life easier. This has been especially tricky for me since I had to intercept the select configuration URB, configure the device myself, and so forth. I also intercept select interface commands but just pass back my current cached interface information to the top-level driver since the select configuration WDF command does not seem to fill in the URB after it is called, and this hacky workaround works since the device is just using alternate setting 0 for all devices.
At any rate, I am able to send and receive data via control requests, doing vendor-specific commands, but I am stuck on what is hopefully one of my final problems, that of handling interrupt endpoints. I have several endpoints on multiple interfaces, and I need to be able to send and receive data to them.
I have tried different things – WdfUsbTargetPipeWriteSynchronously, messing around with a continuous reader (which has its own issues I could ask about), but I was not able to send or receive data with any of them, as far as I could tell. Finally, I tried a plain WdfUsbTargetPipeReadSynchronously call, following the little MSDN example. This actually crashes my Windows Vista 64-bit system WITHOUT a blue screen. Some black lines/garbage flashes for a second, and hten the system reboots, with no minidump or anything.
Does anyone have any idea what could be causing this? Even better, does anyone have any suggestions how I might implement filter driver functionality that lets me send and receive packets quickly and reliably to various endpoints, endpoints that the top-level driver may ordinarily read from (this is the key one, I think) and write to (not as common)? I would like to have a feature where if a certain driver mode is enabled via IOCTL, my driver will instantly start making the endpoint packet data available to userspace without the top-level driver even being aware of anything. The top-level driver has pending interrupt read requests, so I am not sure if there is a way to pre-empt those without completing or cancelling them. For starters, I need to figure out any way to successfully read the data, however.
Thanks very much for your time!