How to "mark pending" an WDF request object?

In the meantime, until I’m waiting that my pre-ordered >Introduction to the
Windows Driver Foundation
Kernel Mode Driver Framework< book gets it final dot (and I guess the answer
will very likely be there :-)), I have this question:

I’m playing and learning with KMDF10. I took KMDF Toaster example and
enhance it to add Toaster generic disk PDO. With WDF framework support I was
able to build something that show “toaster disk” in Disk Management really
quickly. Now I would like to add some more functionality (e.g. read/write
SRBs) and I’m wondering how to implement IoMarkIrpPending and return
STATUS_PENDING handling, which can be done with IRPs. In KMDF driver event
handler I don’t have IRP, but I have request object handle instead. My guess
is that I could simply “post” IO request object handle from origin thread to
my_worker thread (without calling WdfCompleteRequest) and then some later
time in my_worker thread complete that WDF request object with
WdfCompleteRequest. Similar approach was described in latest NT Insider for
KMDF Filter Driver (how it can complete IO requests).

Is it really that simple?

I did not experiment it (yet), instead I posted this question, to see if I’m
on right direction and save some time.

I searched the WDF KMDF 1.0 help documentation but I did not found an
explicit notice that this is allowed, on the other hand I also did not found
notice that this is not allowed or wrong.

WBR

Requests are automatically pended for you. You must set/clear the
cancel routine if you are going o pemd I internally for a long time.
Since storage doesn’t support i/o cancellation, you have nothing left to
do. do yes, ut us that simple.

d

– I can spell, I just can’t type.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Primoz Beltram
Sent: Tuesday, April 18, 2006 10:50 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to “mark pending” an WDF request object?

In the meantime, until I’m waiting that my pre-ordered >Introduction to
the Windows Driver Foundation
Kernel Mode Driver Framework< book gets it final dot (and I guess the
answer will very likely be there :-)), I have this question:

I’m playing and learning with KMDF10. I took KMDF Toaster example and
enhance it to add Toaster generic disk PDO. With WDF framework support I
was able to build something that show “toaster disk” in Disk Management
really quickly. Now I would like to add some more functionality (e.g.
read/write SRBs) and I’m wondering how to implement IoMarkIrpPending and
return STATUS_PENDING handling, which can be done with IRPs. In KMDF
driver event handler I don’t have IRP, but I have request object handle
instead. My guess is that I could simply “post” IO request object handle
from origin thread to my_worker thread (without calling
WdfCompleteRequest) and then some later time in my_worker thread
complete that WDF request object with WdfCompleteRequest. Similar
approach was described in latest NT Insider for KMDF Filter Driver (how
it can complete IO requests).

Is it really that simple?

I did not experiment it (yet), instead I posted this question, to see if
I’m on right direction and save some time.
I searched the WDF KMDF 1.0 help documentation but I did not found an
explicit notice that this is allowed, on the other hand I also did not
found notice that this is not allowed or wrong.

WBR


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