Hi,
I use Bulkusb sample in DDK to read USB device data.I add a DPC routine
for polling reading data.I only want a readdata() routine int the driver,no IRP needed. How can I do that?Thanks a lot.
ÎÞÏÞÈÝÁ¿ÑÅ»¢Ïà²á£¬ÔͼµÈ´óÏÂÔØ£¬³¬¿ìËٶȣ¬¸Ï¿ìÇÀ×¢£¡
Are you asking if you can read from your usb device without sending a
read URB to it all the time? The answer is no. The read URB is the
only way to get data from the device. Using a DPC to poll is also not
very efficient. If you need to constantly have a read URB pending with
the device to always receive data, just resend the completed read URB
from it’s completion routine back down to the device.
I strongly suggest that you consider KMDF for your driver and rewrite it
using KMDF. It has a built in continuous read which takes care of this
logic and helps with a lot of other things.
d