KMDF and request access

Is it safe to access the context returned by WdfObjectGetTypedContext
for a request that was found on a queue by calling
WdfIoQueueFindRequest() without retrieving the request first? The
information I need to determine if it is the request I am looking for is
contained in its context, not in the parameters.

Beverly

No, it is not valid to do so. The WDFREQUEST value should be treated purely as a cookie and not a valid handle until you retrieve the request.

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Friday, July 07, 2006 8:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF and request access

Is it safe to access the context returned by WdfObjectGetTypedContext for a request that was found on a queue by calling WdfIoQueueFindRequest() without retrieving the request first? The information I need to determine if it is the request I am looking for is contained in its context, not in the parameters.
?
Beverly


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

I guess I’ll have to abandon the manual queue and use a collection instead, then.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Friday, July 07, 2006 1:31 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] KMDF and request access

No, it is not valid to do so. The WDFREQUEST value should be treated purely as a cookie and not a valid handle until you retrieve the request.

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Friday, July 07, 2006 8:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF and request access

Is it safe to access the context returned by WdfObjectGetTypedContext for a request that was found on a queue by calling WdfIoQueueFindRequest() without retrieving the request first? The information I need to determine if it is the request I am looking for is contained in its context, not in the parameters.
?
Beverly


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


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

My team corrected me :)…my previous response was incorrect.

It is a valid thing to do. The request’s context can be retrieved after it is found until you either release the reference (which invalidates the handle value) or you retrieve the found request (which means you can still use it b/c the handle is now yours).

d

-----Original Message-----
From: Doron Holan
Sent: Friday, July 07, 2006 10:31 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] KMDF and request access

No, it is not valid to do so. The WDFREQUEST value should be treated purely as a cookie and not a valid handle until you retrieve the request.

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Friday, July 07, 2006 8:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF and request access

Is it safe to access the context returned by WdfObjectGetTypedContext for a request that was found on a queue by calling WdfIoQueueFindRequest() without retrieving the request first? The information I need to determine if it is the request I am looking for is contained in its context, not in the parameters.
?
Beverly


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

Thank you!

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Saturday, July 08, 2006 12:20 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] KMDF and request access

My team corrected me :)…my previous response was incorrect.

It is a valid thing to do. The request’s context can be retrieved after it is found until you either release the reference (which invalidates the handle value) or you retrieve the found request (which means you can still use it b/c the handle is now yours).

d

-----Original Message-----
From: Doron Holan
Sent: Friday, July 07, 2006 10:31 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] KMDF and request access

No, it is not valid to do so. The WDFREQUEST value should be treated purely as a cookie and not a valid handle until you retrieve the request.

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Friday, July 07, 2006 8:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF and request access

Is it safe to access the context returned by WdfObjectGetTypedContext for a request that was found on a queue by calling WdfIoQueueFindRequest() without retrieving the request first? The information I need to determine if it is the request I am looking for is contained in its context, not in the parameters.
?
Beverly


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


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