Send and forget means “I didn’t do anything with this irp, behave as if
I didn’t exist in the device stack”. That means that it skips the
current stack location and reuses it for the next driver in the stack.
Your formatting uses the next stack location, which means that it is
lost b/c the current stack location pointer will be wrong when the
usbhub sees the request. Furthermore, you can only send and forget
requests you created yourself, if Request is a WDFQUEUE presented
request, you must set a completion routine so that you can complete the
request later when it travels up the stack.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Wednesday, May 09, 2007 2:21 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB Target Send and Forget
HELP!
I can’t seem to get an input write Requst, format it for a bulk pipe,
and then send it down the USB stack using Send and Forget.
It seems that WdfRequestSend is hammering the stack location that
WdfUsbTargetPipeWhateverTheRestOfTheNameIs has previously set up.
I cannot see what I am doing wrong.
Help??
Fred
status =
WdfUsbTargetPipeFormatRequestForWrite(devContext->BulkOutPipe,
Request,
requestMemory,
NULL);
if(!NT_SUCCESS(status)){
WdfRequestComplete(Request, status);
return;
}
WDF_REQUEST_SEND_OPTIONS_INIT(&sendOptions,
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET);
if (!WdfRequestSend(Request,
WdfUsbTargetPipeGetIoTarget(devContext->BulkOutPipe),
&sendOptions)) {
status = WdfRequestGetStatus(Request);
WdfRequestComplete(Request, status);
return;
}
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer