I have an IOCTL defined for performing a read of an Interrupt IN endpoint on
my USB device. User mode code makes an overlapped call of DeviceIoControl
with this IOCTL, and waits (perhaps for a long time) for the result.
When the associated Irp shows up in my DispatchDeviceControl function, can I
continue to use it without creating a new Irp? Could I just change its major
function to IOCTL_INTERNAL_USB_SUBMIT_URB, attach an appropriate URB to it,
and pass it down, and forget about it?
Will the USBD take care of completion and / or cancellation, or do I have
to worry about this, even though I did not create the Irp in the driver.

Thanks in advance for the help,
Dennis

Re: Re-using Irp for Usb by Maxim

Maxim
Tue Sep 21 19:16:31 CDT 2004

Yes, but use its next stack location (as usually).

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"Dennis Burns" <dburns@rtessentials.com> wrote in message
news:OB%23VQBDoEHA.2904@TK2MSFTNGP15.phx.gbl...
> I have an IOCTL defined for performing a read of an Interrupt IN endpoint on
> my USB device. User mode code makes an overlapped call of DeviceIoControl
> with this IOCTL, and waits (perhaps for a long time) for the result.
> When the associated Irp shows up in my DispatchDeviceControl function, can I
> continue to use it without creating a new Irp? Could I just change its major
> function to IOCTL_INTERNAL_USB_SUBMIT_URB, attach an appropriate URB to it,
> and pass it down, and forget about it?
> Will the USBD take care of completion and / or cancellation, or do I have
> to worry about this, even though I did not create the Irp in the driver.
>
> Thanks in advance for the help,
> Dennis
>
>