Re: determining process context
- From: "David" <know_devig@xxxxxxxxxxx>
- Date: 22 Jul 2005 23:18:45 -0700
Does that mean, when it runs under system process context it is
essentially same "Application" process context by which this dispatch
routine is called?
Reason of this question is, I need to access buffer pointer from IRP
which has User virtual address and in order to access that, i need to
be in same process context else i will corrupt some memory.
So am i doing it correctly by running PsCreateSystemThread in system
process context ? if not, what do I need to do to achieve this?
- David
cristalink wrote:
> >> Is my Thread running in the same process context where Irp buffer belongs
>
> PsCreateSystemThread has nothing to do with IRPs. The process context of the
> created thread depends on the 4th parameter of PsCreateSystemThread. As per
> DDK documentation, you should use NULL for the 4th parameter. If you do,
> then the thread will run in the system process context.
> --
> http://www.cristalink.com
>
>
> "David" <know_devig@xxxxxxxxxxx> wrote in message
> news:1122086162.688945.164730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > Hi,
> > I am developing WDM driver and curious about process context.
> >
> > 1) My Application calls DeviceIoControl.
> > 2) My Driver's Dispatch routine gets invoked, in this routine I start
> > thread using PsCreateSystemThread. ( Which waits on syncronization
> > objects)
> > 3) Once Interrupt (or synchronization event) happens, this thread
> > wakes up and start processing pending IRP.
> >
> > So question is ->
> > 1) Is my Thread running in the same process context where Irp buffer
> > belongs? Because I need to lock the buffer and write some data to it,
> > (I am using METHODE_NEITHER)
> >
> > Thanks,
> > David
> >
.
- Follow-Ups:
- Re: determining process context
- From: Don Burn
- Re: determining process context
- From: cristalink
- Re: determining process context
- References:
- determining process context
- From: David
- Re: determining process context
- From: cristalink
- determining process context
- Prev by Date: Re: determining process context
- Next by Date: Re: determining process context
- Previous by thread: Re: determining process context
- Next by thread: Re: determining process context
- Index(es):
Relevant Pages
|