Hi,
I’m developing a USB KMDF driver for my device. My USB device buffers A/D Data and send it over using Isochronous Endpoint IN. After windows loads the driver and selects configuration my driver does the following:
1- Looks for the Isochronous Pipe IN and retrieves a WDFUSBPIPE Handle.
2- Creates a driver Request using WdfRequestCreate.
3- Create URB for Isochronous transfer with 100 Isochronous packets.
4- Format Request Using WdfUsbTargetDeviceFormatRequestForUrb.
5- Set a completion routine and then send the request using WdfRequestSend.
After the USB Stack completes the transfers the request complete routine event is called and does the following:
6- Copies the retrieved data buffer to the application’s buffer if it has been requested earlier.
7- Calls WdfObjectDelete to complete the request.
8- Then calls WdfRequestReuse to reuse the request and creates the same Urb for Isochronous transfers.
I used this method to continuously read data from the usb pipe.
So far everything works just fine. I am able to read data from a C# application.
My problems is when I unplug my usb device. The moment I unplug the usb device i get bluescreen with bugcheck 1000007f. However, if I ejected the device before unplugging it the bugcheck does not occur. Please help me figure out what the problem. I’m running my driver on a Windows 7 32-bit machine
Below is the routine used to create Urb for Isochronous transfers