Gurus,
I know this issue has been discussed at great length
in the past and I have gone through the list archive.
I have one question. I want to do some
xxxDispatchRoutin()
{
// do some preprocessing
}
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
krnl_drv wrote:
Gurus,
I know this issue has been discussed at great length
in the past and I have gone through the list archive.
I have one question. I want to do some
xxxDispatchRoutin()
{
// do some preprocessing
}
That’s not a question. Can you try again?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
I hit the send wrongly. I aplogize for that.
My question is this:
I want to do some post-processing for certain dispatch
routing ( say Read/write)
I don’t make the original request snchronous by
waiting on an Event in my dispatch routing and doing
the post processing there. So, can I do something like
this
// Dispatch Routine
- Set the completion routine
- Return the status of IoCallDriver()
// Completion Routine
- if ( Irp->PendingReturned)
IoMarkIrpPending()
- IoQueueWorkItem(&WorkItem)
- return (STATUS_MORE_PROCESSING_REQUIRED)
I read one suggested approach in one of white papers @
OSR. But still not sure why can’t I do the above work
sequence.
Regards
Sid
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
Wht you propose is conceptually OK. Why do you think it won’t work?
What bugcheck are you getting and what’s the callstack? Is WorkItem
stack based? If so, that is the problem.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of krnl_drv
Sent: Friday, September 16, 2005 1:04 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoCompletionRoutine
I hit the send wrongly. I aplogize for that.
My question is this:
I want to do some post-processing for certain dispatch
routing ( say Read/write)
I don’t make the original request snchronous by
waiting on an Event in my dispatch routing and doing
the post processing there. So, can I do something like
this
// Dispatch Routine
- Set the completion routine
- Return the status of IoCallDriver()
// Completion Routine
- if ( Irp->PendingReturned)
IoMarkIrpPending()
- IoQueueWorkItem(&WorkItem)
- return (STATUS_MORE_PROCESSING_REQUIRED)
I read one suggested approach in one of white papers @
OSR. But still not sure why can’t I do the above work
sequence.
Regards
Sid
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Who says you can’t? Have you tried it, and if so, what was the result?
Your completion routine is your opportunity to advance the state of the IRP.
There are certain restrictions on what you may do in the completion routine,
but these restrictions are not onerous.
– arlie
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of krnl_drv
Sent: Friday, September 16, 2005 4:04 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoCompletionRoutine
I hit the send wrongly. I aplogize for that.
My question is this:
I want to do some post-processing for certain dispatch routing ( say
Read/write) I don’t make the original request snchronous by waiting on an
Event in my dispatch routing and doing the post processing there. So, can I
do something like this
// Dispatch Routine
- Set the completion routine
- Return the status of IoCallDriver()
// Completion Routine
- if ( Irp->PendingReturned)
IoMarkIrpPending()
- IoQueueWorkItem(&WorkItem)
- return (STATUS_MORE_PROCESSING_REQUIRED)
I read one suggested approach in one of white papers @ OSR. But still not
sure why can’t I do the above work sequence.
Regards
Sid
Yahoo! Mail - PC Magazine Editors’ Choice 2005 http://mail.yahoo.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stonestreetone.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
I am still into my design phase and was evaluating
option for post processing. Even my understanding was
that I should be able to do this. And i didn’t see in
the DDK which suggested other wise. I have two more
questions:
- Will this method work for both synchronous and
asynchronous request? Any performance / better
alternatives?
- In my workitem call back routine, I can build&
issue another IRP and complete the orignal IRP
thx
SID
— Doron Holan wrote:
> Wht you propose is conceptually OK. Why do you
> think it won’t work?
> What bugcheck are you getting and what’s the
> callstack? Is WorkItem
> stack based? If so, that is the problem.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of krnl_drv
> Sent: Friday, September 16, 2005 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] IoCompletionRoutine
>
> I hit the send wrongly. I aplogize for that.
> My question is this:
> I want to do some post-processing for certain
> dispatch
> routing ( say Read/write)
> I don’t make the original request snchronous by
> waiting on an Event in my dispatch routing and doing
> the post processing there. So, can I do something
> like
> this
>
> // Dispatch Routine
> 1. Set the completion routine
> 2. Return the status of IoCallDriver()
> // Completion Routine
> 1. if ( Irp->PendingReturned)
> IoMarkIrpPending()
> 2. IoQueueWorkItem(&WorkItem)
> 3. return (STATUS_MORE_PROCESSING_REQUIRED)
>
> I read one suggested approach in one of white papers
> @
> OSR. But still not sure why can’t I do the above
> work
> sequence.
>
> Regards
> Sid
>
>
>
>
>
>
>
>
> Yahoo! Mail - PC Magazine Editors’ Choice 2005
> http://mail.yahoo.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@microsoft.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
> 2. IoQueueWorkItem(&WorkItem)
And Hopefully your work item will complete the irp.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-220223-
xxxxx@lists.osr.com] On Behalf Of Arlie Davis
Sent: Friday, September 16, 2005 1:12 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoCompletionRoutine
Who says you can’t? Have you tried it, and if so, what was the
result?
Your completion routine is your opportunity to advance the state of
the
IRP.
There are certain restrictions on what you may do in the completion
routine,
but these restrictions are not onerous.
– arlie
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of krnl_drv
Sent: Friday, September 16, 2005 4:04 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoCompletionRoutine
I hit the send wrongly. I aplogize for that.
My question is this:
I want to do some post-processing for certain dispatch routing ( say
Read/write) I don’t make the original request snchronous by waiting on
an
Event in my dispatch routing and doing the post processing there. So,
can
I
do something like this
// Dispatch Routine
- Set the completion routine
- Return the status of IoCallDriver()
// Completion Routine
- if ( Irp->PendingReturned)
IoMarkIrpPending()
- IoQueueWorkItem(&WorkItem)
- return (STATUS_MORE_PROCESSING_REQUIRED)
I read one suggested approach in one of white papers @ OSR. But still
not
sure why can’t I do the above work sequence.
Regards
Sid
Yahoo! Mail - PC Magazine Editors’ Choice 2005 http://mail.yahoo.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stonestreetone.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@mendocinosoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
- yes. An alternative would be to not queue the work item just do the
work that the work item would do in the completion routine, basically,
Create new irp
Format new irp
Set completion routine on new irp
Send new irp async
return STATUS_MORE_PROCESSING_REQUIRED;
- sure
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of krnl_drv
Sent: Friday, September 16, 2005 1:54 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoCompletionRoutine
I am still into my design phase and was evaluating
option for post processing. Even my understanding was
that I should be able to do this. And i didn’t see in
the DDK which suggested other wise. I have two more
questions:
- Will this method work for both synchronous and
asynchronous request? Any performance / better
alternatives?
- In my workitem call back routine, I can build&
issue another IRP and complete the orignal IRP
thx
SID
— Doron Holan wrote:
> Wht you propose is conceptually OK. Why do you
> think it won’t work?
> What bugcheck are you getting and what’s the
> callstack? Is WorkItem
> stack based? If so, that is the problem.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of krnl_drv
> Sent: Friday, September 16, 2005 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] IoCompletionRoutine
>
> I hit the send wrongly. I aplogize for that.
> My question is this:
> I want to do some post-processing for certain
> dispatch
> routing ( say Read/write)
> I don’t make the original request snchronous by
> waiting on an Event in my dispatch routing and doing
> the post processing there. So, can I do something
> like
> this
>
> // Dispatch Routine
> 1. Set the completion routine
> 2. Return the status of IoCallDriver()
> // Completion Routine
> 1. if ( Irp->PendingReturned)
> IoMarkIrpPending()
> 2. IoQueueWorkItem(&WorkItem)
> 3. return (STATUS_MORE_PROCESSING_REQUIRED)
>
> I read one suggested approach in one of white papers
> @
> OSR. But still not sure why can’t I do the above
> work
> sequence.
>
> Regards
> Sid
>
>
>
>
>
>
>
>
> Yahoo! Mail - PC Magazine Editors’ Choice 2005
> http://mail.yahoo.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@microsoft.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
1 - yes. The IO manager takes care of turning an asynch operation into
a synch one if application requested synchronous I/O. In general your
driver shouldn’t care if the application opened the file synch or
asynch.
2 - you can. However if the two requests are related, ask yourself how
you’ll get the status from that second request communicated to the
client.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of krnl_drv
Sent: Friday, September 16, 2005 1:54 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoCompletionRoutine
I am still into my design phase and was evaluating option for post
processing. Even my understanding was that I should be able to do this.
And i didn’t see in the DDK which suggested other wise. I have two more
questions:
- Will this method work for both synchronous and asynchronous request?
Any performance / better alternatives?
- In my workitem call back routine, I can build& issue another IRP and
complete the orignal IRP
thx
SID
— Doron Holan wrote:
> Wht you propose is conceptually OK. Why do you think it won’t work?
> What bugcheck are you getting and what’s the callstack? Is WorkItem
> stack based? If so, that is the problem.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of krnl_drv
> Sent: Friday, September 16, 2005 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] IoCompletionRoutine
>
> I hit the send wrongly. I aplogize for that.
> My question is this:
> I want to do some post-processing for certain dispatch routing ( say
> Read/write) I don’t make the original request snchronous by waiting on
> an Event in my dispatch routing and doing the post processing there.
> So, can I do something like this
>
> // Dispatch Routine
> 1. Set the completion routine
> 2. Return the status of IoCallDriver() // Completion Routine 1. if (
> Irp->PendingReturned)
> IoMarkIrpPending()
> 2. IoQueueWorkItem(&WorkItem)
> 3. return (STATUS_MORE_PROCESSING_REQUIRED)
>
> I read one suggested approach in one of white papers @ OSR. But still
> not sure why can’t I do the above work sequence.
>
> Regards
> Sid
>
>
>
>
>
>
>
>
> Yahoo! Mail - PC Magazine Editors’ Choice 2005 http://mail.yahoo.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@microsoft.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Yahoo! Mail - PC Magazine Editors’ Choice 2005 http://mail.yahoo.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Thanks. It helps.
— Doron Holan wrote:
> 1) yes. An alternative would be to not queue the
> work item just do the
> work that the work item would do in the completion
> routine, basically,
>
> Create new irp
> Format new irp
> Set completion routine on new irp
> Send new irp async
>
> return STATUS_MORE_PROCESSING_REQUIRED;
>
> 2) sure
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of krnl_drv
> Sent: Friday, September 16, 2005 1:54 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] IoCompletionRoutine
>
> I am still into my design phase and was evaluating
> option for post processing. Even my understanding
> was
> that I should be able to do this. And i didn’t see
> in
> the DDK which suggested other wise. I have two more
> questions:
> 1. Will this method work for both synchronous and
> asynchronous request? Any performance / better
> alternatives?
> 2. In my workitem call back routine, I can build&
> issue another IRP and complete the orignal IRP
>
> thx
> SID
>
> — Doron Holan wrote:
>
> > Wht you propose is conceptually OK. Why do you
> > think it won’t work?
> > What bugcheck are you getting and what’s the
> > callstack? Is WorkItem
> > stack based? If so, that is the problem.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On
> Behalf
> > Of krnl_drv
> > Sent: Friday, September 16, 2005 1:04 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] IoCompletionRoutine
> >
> > I hit the send wrongly. I aplogize for that.
> > My question is this:
> > I want to do some post-processing for certain
> > dispatch
> > routing ( say Read/write)
> > I don’t make the original request snchronous by
> > waiting on an Event in my dispatch routing and
> doing
> > the post processing there. So, can I do something
> > like
> > this
> >
> > // Dispatch Routine
> > 1. Set the completion routine
> > 2. Return the status of IoCallDriver()
> > // Completion Routine
> > 1. if ( Irp->PendingReturned)
> > IoMarkIrpPending()
> > 2. IoQueueWorkItem(&WorkItem)
> > 3. return (STATUS_MORE_PROCESSING_REQUIRED)
> >
> > I read one suggested approach in one of white
> papers
> > @
> > OSR. But still not sure why can’t I do the above
> > work
> > sequence.
> >
> > Regards
> > Sid
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Mail - PC Magazine Editors’ Choice 2005
> > http://mail.yahoo.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> > xxxxx@microsoft.com
> > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown
> > lmsubst tag argument: ‘’
> > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>
>
>
>
>
> Yahoo! Mail - PC Magazine Editors’ Choice 2005
> http://mail.yahoo.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@microsoft.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
__________________________________
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com