The documentation on this function says to look at WdfRequestSend for a code
example.
In the code example for WdfRequestSend, the “CompletionContext” parameter
for WdfRequestSetCompletionRoutine is set to a WDFUSBPIPE type rather than a
WDFCONTEXT type. If you search the examples in \WINDDK\WDF\KMDF10\src\kmdf
it looks like they also set the “CompletionContext” parameter to a
WDFUSBPIPE type.
So now I’m wondering if this is a documentation bug that was carried into to
examples too. I’m also wondering how the compiler didn’t catch it.
Dave
Since WDFCONTEXT is a PVOID, if you compile using /w3 it ignores the
type
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Voeller
Sent: Thursday, June 08, 2006 12:25 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfRequestSetCompletionRoutine
The documentation on this function says to look at WdfRequestSend for a
code
example.
In the code example for WdfRequestSend, the “CompletionContext”
parameter
for WdfRequestSetCompletionRoutine is set to a WDFUSBPIPE type rather
than a
WDFCONTEXT type. If you search the examples in
\WINDDK\WDF\KMDF10\src\kmdf
it looks like they also set the “CompletionContext” parameter to a
WDFUSBPIPE type.
So now I’m wondering if this is a documentation bug that was carried
into to
examples too. I’m also wondering how the compiler didn’t catch it.
Dave
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
So I added
MSC_WARNING_LEVEL=/W3 /WX
to the sources file, recompiled and still saw no errors or warnings. Then I
tried
MSC_WARNING_LEVEL=/W4 /WX
and got several errors but I saw none for WdfRequestSetCompletionRoutine.
“Doron Holan” wrote in message
news:xxxxx@ntdev…
Since WDFCONTEXT is a PVOID, if you compile using /w3 it ignores the
type
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Voeller
Sent: Thursday, June 08, 2006 12:25 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfRequestSetCompletionRoutine
The documentation on this function says to look at WdfRequestSend for a
code
example.
In the code example for WdfRequestSend, the “CompletionContext”
parameter
for WdfRequestSetCompletionRoutine is set to a WDFUSBPIPE type rather
than a
WDFCONTEXT type. If you search the examples in
\WINDDK\WDF\KMDF10\src\kmdf
it looks like they also set the “CompletionContext” parameter to a
WDFUSBPIPE type.
So now I’m wondering if this is a documentation bug that was carried
into to
examples too. I’m also wondering how the compiler didn’t catch it.
Dave
—
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 see what you are talking about now. This is not an issue. WDFCONTEXT
is purely a PVOID under a different type name so passing any pointer
value will work b/c you are going from a typed pointer to an untyped
pointer. The sample could be a little clearer and have a WDFCONTEXT
cast I guess.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Voeller
Sent: Thursday, June 08, 2006 1:57 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] WdfRequestSetCompletionRoutine
So I added
MSC_WARNING_LEVEL=/W3 /WX
to the sources file, recompiled and still saw no errors or warnings.
Then I
tried
MSC_WARNING_LEVEL=/W4 /WX
and got several errors but I saw none for
WdfRequestSetCompletionRoutine.
“Doron Holan” wrote in message
news:xxxxx@ntdev…
Since WDFCONTEXT is a PVOID, if you compile using /w3 it ignores the
type
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Voeller
Sent: Thursday, June 08, 2006 12:25 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfRequestSetCompletionRoutine
The documentation on this function says to look at WdfRequestSend for a
code
example.
In the code example for WdfRequestSend, the “CompletionContext”
parameter
for WdfRequestSetCompletionRoutine is set to a WDFUSBPIPE type rather
than a
WDFCONTEXT type. If you search the examples in
\WINDDK\WDF\KMDF10\src\kmdf
it looks like they also set the “CompletionContext” parameter to a
WDFUSBPIPE type.
So now I’m wondering if this is a documentation bug that was carried
into to
examples too. I’m also wondering how the compiler didn’t catch it.
Dave
—
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