RE: Blocking the request in filter driver's completion (p ost-filtering) [Impossible?]

No - the completion handler is essentially a boolean function, it either
returns STATUS_MORE_PROCESSING_REQUIRED or some other value, what that other
value is doesn’t matter. DV is complaining about a mismatch between the
Irp->IoStatus.Status value and the value returned from the Dispatch routine,
which values are supposed to match if the IO request is completed on the
dispatch side, which it is in the OP’s case.

=====================
Mark Roddy

-----Original Message-----
From: Mats PETERSSON [mailto:xxxxx@3dlabs.com]
Sent: Thursday, November 11, 2004 11:42 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Blocking the request in filter driver’s completion
(post-filtering) [Impossible?]

Have you tried returning “STATUS_UNSUCCESSFUL” or something similar from
your function where you refuse the IRP? I think that’s how you’re supposed
to do it, but I’m not an expert…


Mats

-------- Notice --------
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or any
action taken by you in reliance on it, is prohibited and may be unlawful.
If you have received this message in error, please delete it and contact the
sender immediately. Thank you.

xxxxx@lists.osr.com wrote on 11/11/2004 04:12:39 PM:

Hello!

I want to filter request in completion routine of the filter driver
(for example read request: I’ve got data to filter only in completion).

If I want to deny this request with some error status in my completion
I
do:

// …

Irp->IoStatus.Status = STATUS_UNSUCCESFUL; // or some specific status
Irp->IoStatus.Information = 0;

return STATUS_SUCCESS;
}

But the driver verifier tolds:

“And IRP dispatch handler has returned a status that is inconsistent
with Irp’s IoStatus.Status field.”

That’s because DeviceDispatch returned STATUS_SUCCESS (it doesn’t know
about
completions and post-filtering) but Irp->IoStatus.Status = ERROR.

I can’t change return value of DeviceDispatch routine. Is it means
it’s impossible to implement such technique in filter drivers?

Vlad


Questions? First check the Kernel Driver FAQ at http://www.
osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

ForwardSourceID:NT0000728E


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com