WDFREQUEST xx has not been formatted, cannot send

Hello,

The error in message title (from the !wdfdumplog, originated from FxIoTarget::SubmitLocked), is what I get when trying to WdfRequestSend a usb request that was received by my driver. The function returns FALSE with request status 0xC00000D0 (STATUS_REQUEST_NOT_ACCEPTED)
The iotarget is the original target, options flags are 0 and I install a completion routine. Besides that, I do not change anything in the request.
The only thing that’s a bit out of the ordinary is that I delay this request for a while (I send a few read/write URBs before).

Does anyone have any idea:
a) What am I doing wrong?
b) What does that message mean?
c) How can I debug the KMDF internal functions and structures (mainly the structures - such as FxRequest, FxIoTarget - since they are harder to obtain/understand by RE)?

Thanks,
Noam.

Did you actually format the request yourself using the WdfUsbPipe or other formatting APIs? I would guess not. Each stack location in an IRP needs to be formatted, just b/c you received a IRP formatted as a USB request does not mean that this format is propagated to all other stack locations below it in the irp.

The solution is rather simple, call WdfRequestFormatRequestUsingCurrentType to format the next stack location with the current location’s type (URB)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, September 16, 2008 7:27 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDFREQUEST xx has not been formatted, cannot send

Hello,

The error in message title (from the !wdfdumplog, originated from FxIoTarget::SubmitLocked), is what I get when trying to WdfRequestSend a usb request that was received by my driver. The function returns FALSE with request status 0xC00000D0 (STATUS_REQUEST_NOT_ACCEPTED)
The iotarget is the original target, options flags are 0 and I install a completion routine. Besides that, I do not change anything in the request.
The only thing that’s a bit out of the ordinary is that I delay this request for a while (I send a few read/write URBs before).

Does anyone have any idea:
a) What am I doing wrong?
b) What does that message mean?
c) How can I debug the KMDF internal functions and structures (mainly the structures - such as FxRequest, FxIoTarget - since they are harder to obtain/understand by RE)?

Thanks,
Noam.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Yeah, I was just now reading about this function.
What tricked me was that in most cases it *did* work without calling this function - When not installing completion routine, or when specifying SEND_AND_FORGET flag. Why did it work? Was it just luck or is it not needed in these cases?

About the 3rd question - Is there any resources to debug the KMDF internals?

Thanks,
Noam.

Not luck, by design. Send and forget works b/c you are reusing the current stack location for the next stack location (which is why you cannot set a completion routine in this case). This is the equivalent of IoSkipCurrentIrpStackLocation. To get a better understanding of how this works, you need to dive into PIRP semantics and how an IO_STACK_LOCATION is formatted for each device in the stack

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, September 16, 2008 8:14 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WDFREQUEST xx has not been formatted, cannot send

Yeah, I was just now reading about this function.
What tricked me was that in most cases it *did* work without calling this function - When not installing completion routine, or when specifying SEND_AND_FORGET flag. Why did it work? Was it just luck or is it not needed in these cases?

About the 3rd question - Is there any resources to debug the KMDF internals?

Thanks,
Noam.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer