Hello,
do IRPs issued by PnP manager (and in general) default to STATUS_SUCCESS or are they undefined?
Thanks.
Hello,
do IRPs issued by PnP manager (and in general) default to STATUS_SUCCESS or are they undefined?
Thanks.
They have a default value but that default value is undocumented. You
should not test for it, if that is what you are thinking of doing,
unless you really have no other way to solve whatever problem it is that
convinced you to ask this question.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hushmail.com
Sent: Thursday, September 06, 2007 6:33 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] What’s an IRP’s default IoStatus.Status value?
Hello,
do IRPs issued by PnP manager (and in general) default to STATUS_SUCCESS
or are they undefined?
Thanks.
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
xxxxx@hushmail.com wrote:
do IRPs issued by PnP manager (and in general) default to STATUS_SUCCESS or are they undefined?
Typically, PnP sets IoStatus.Status to STATUS_NOT_SUPPORTED
(0xC00000BB). Thus, if no one touches the status, PnP gets a somewhat
meaningful error.
For IRPs between drivers, all bets are off. It’s entirely up to the
sending driver.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
At least some PnP IRPs are documented to have ->IoStatus.Status filled with
STATUS_SUCCESS, and the stack should preserve this value (if everything is OK)
on ways both up and down. See the docs.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
“Roddy, Mark” wrote in message news:xxxxx@ntdev…
They have a default value but that default value is undocumented. You
should not test for it, if that is what you are thinking of doing,
unless you really have no other way to solve whatever problem it is that
convinced you to ask this question.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hushmail.com
Sent: Thursday, September 06, 2007 6:33 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] What’s an IRP’s default IoStatus.Status value?
Hello,
do IRPs issued by PnP manager (and in general) default to STATUS_SUCCESS
or are they undefined?
Thanks.
—
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
No, it is does not vary. The default status value in all pnp irps is
STATUS_NOT_SUPPORTED. The same can be applied to power and wmi irps.
Which pnp irps do the docs say come with STATUS_SUCCESS as the initial
value?
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Thursday, September 06, 2007 11:09 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] What’s an IRP’s default IoStatus.Status value?
At least some PnP IRPs are documented to have ->IoStatus.Status
filled with
STATUS_SUCCESS, and the stack should preserve this value (if everything
is OK)
on ways both up and down. See the docs.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
“Roddy, Mark” wrote in message
news:xxxxx@ntdev…
They have a default value but that default value is undocumented. You
should not test for it, if that is what you are thinking of doing,
unless you really have no other way to solve whatever problem it is that
convinced you to ask this question.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hushmail.com
Sent: Thursday, September 06, 2007 6:33 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] What’s an IRP’s default IoStatus.Status value?
Hello,
do IRPs issued by PnP manager (and in general) default to STATUS_SUCCESS
or are they undefined?
Thanks.
—
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
—
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
It was actually the documentation which provoked my curiosity, but I didn’t read carefully.
The documentation of IRP_MN_QUERY_PNP_DEVICE_STATE states:
"If a function or filter driver does not handle this IRP, it calls IoSkipCurrentIrpStackLocation, does not set an IoCompletion routine, and passes the IRP down to the next driver. Such a driver must not modify Irp->IoStatus and must not complete the IRP.
If a bus driver does not handle this IRP, it leaves Irp->IoStatus.Status as is and completes the IRP."
I wrongfully thought bus drivers always leave the status value untouched and complete the IRP.
In this (fictitious) case, a function driver might pass the default status STATUS_NOT_SUPPORTED to the bus driver, which then completes, i.e., fails the IRP.
Thanks for all responses.
Maxim S. Shatskih wrote:
See the docs.
xxxxx@hushmail.com wrote:
It was actually the documentation which provoked my curiosity, but I didn’t read carefully.
The documentation of IRP_MN_QUERY_PNP_DEVICE_STATE states:
"If a function or filter driver does not handle this IRP, it calls IoSkipCurrentIrpStackLocation, does not set an IoCompletion routine, and passes the IRP down to the next driver. Such a driver must not modify Irp->IoStatus and must not complete the IRP.If a bus driver does not handle this IRP, it leaves Irp->IoStatus.Status as is and completes the IRP."
I wrongfully thought bus drivers always leave the status value untouched and complete the IRP.
In this (fictitious) case, a function driver might pass the default status STATUS_NOT_SUPPORTED to the bus driver, which then completes, i.e., fails the IRP.
Right, and that’s exactly what you want. If no one in the entire device
stack responded to the IRP, then it is quite appropriate to consider the
IRP as having “failed”. And why did it fail? STATUS_NOT_SUPPORTED.
It’s one of those rare cases where the reported result exactly matches
the reality of the situation.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.