Filtering IRP's

I’m rather new to driver development, so can you say a few words about the
following scheme of IRP’s processing ?

  1. I do attach to a device
  2. I set mydevice->StackSize = lowerdevice.StackSize
  3. I ALWAYS use IoSkipCurrentStackLocation
  4. If I need to have CompletionRoutine, I remember the real CRaddress, set
    my own CR and will call real CR in my own CR (if realCR == NULL, I will
    call only my own CR)

I think this should work, but I’m not absolutely sure about it …
what can you say ?


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Why bother with such non-trivialities?
Why not create one more stack location and use IoCopyCurrentIrpStackLocationToNext?

Max

----- Original Message -----
From: “foxgen”
To: “NT Developers Interest List”
Sent: Friday, December 14, 2001 12:34 PM
Subject: [ntdev] Filtering IRP’s

> I’m rather new to driver development, so can you say a few words about the
> following scheme of IRP’s processing ?
>
> 1. I do attach to a device
> 2. I set mydevice->StackSize = lowerdevice.StackSize
> 3. I ALWAYS use IoSkipCurrentStackLocation
> 4. If I need to have CompletionRoutine, I remember the real CRaddress, set
> my own CR and will call real CR in my own CR (if realCR == NULL, I will
> call only my own CR)
>
> I think this should work, but I’m not absolutely sure about it …
> what can you say ?
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

If you’re attaching to tcp, udp, ip - you will encounter with
StackLocations-problem …
You will have to control boot-order of your driver, or use proxy-scheme of
your driver …

the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but my
scheme needs less memory…

So, do you think the scheme, I proposed is not good ?

Foxgen.

Why bother with such non-trivialities?
Why not create one more stack location and use
IoCopyCurrentIrpStackLocationToNext?

Max

----- Original Message -----
From: “foxgen”
> To: “NT Developers Interest List”
> Sent: Friday, December 14, 2001 12:34 PM
> Subject: [ntdev] Filtering IRP’s
>
>
> > I’m rather new to driver development, so can you say a few words about
the
> > following scheme of IRP’s processing ?
> >
> > 1. I do attach to a device
> > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > 3. I ALWAYS use IoSkipCurrentStackLocation
> > 4. If I need to have CompletionRoutine, I remember the real CRaddress,
set
> > my own CR and will call real CR in my own CR (if realCR == NULL, I will
> > call only my own CR)
> >
> > I think this should work, but I’m not absolutely sure about it …
> > what can you say ?
> >
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@yandex.ru
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

For me, it would be better to patch SRV’s registry to increase the number of stack locations.

Max

----- Original Message -----
From: “foxgen”
To: “NT Developers Interest List”
Sent: Monday, December 17, 2001 12:01 PM
Subject: [ntdev] Re: Filtering IRP’s

> If you’re attaching to tcp, udp, ip - you will encounter with
> StackLocations-problem …
> You will have to control boot-order of your driver, or use proxy-scheme of
> your driver …
>
> the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but my
> scheme needs less memory…
>
> So, do you think the scheme, I proposed is not good ?
>
> Foxgen.
>
> > Why bother with such non-trivialities?
> > Why not create one more stack location and use
> IoCopyCurrentIrpStackLocationToNext?
> >
> > Max
> >
> > ----- Original Message -----
> > From: “foxgen”
> > To: “NT Developers Interest List”
> > Sent: Friday, December 14, 2001 12:34 PM
> > Subject: [ntdev] Filtering IRP’s
> >
> >
> > > I’m rather new to driver development, so can you say a few words about
> the
> > > following scheme of IRP’s processing ?
> > >
> > > 1. I do attach to a device
> > > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > > 3. I ALWAYS use IoSkipCurrentStackLocation
> > > 4. If I need to have CompletionRoutine, I remember the real CRaddress,
> set
> > > my own CR and will call real CR in my own CR (if realCR == NULL, I will
> > > call only my own CR)
> > >
> > > I think this should work, but I’m not absolutely sure about it …
> > > what can you say ?
> > >
> > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I do not recommend your scheme. You cannot assume that your driver is the only
3rd party driver that opens \device\tcpip. For example, anti-virus programs that
perform content scanning may be in the stack as well. If another driver
implements the same scheme as you propose, depending on load order, either your
driver’s completion routine or the other driver’s completion routine will be
skipped.

The MS drivers that open tcpip are netbt and afd. As far as I know, afd, netbt,
and tcpip are implemented as legacy drivers (winnt style) through the release of
XP. Therefore, you can enforce load order by using a tag value in the registry.

Dave

foxgen wrote:

If you’re attaching to tcp, udp, ip - you will encounter with
StackLocations-problem …
You will have to control boot-order of your driver, or use proxy-scheme of
your driver …

the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but my
scheme needs less memory…

So, do you think the scheme, I proposed is not good ?

Foxgen.

> Why bother with such non-trivialities?
> Why not create one more stack location and use
IoCopyCurrentIrpStackLocationToNext?
>
> Max
>
> ----- Original Message -----
> From: “foxgen”
> > To: “NT Developers Interest List”
> > Sent: Friday, December 14, 2001 12:34 PM
> > Subject: [ntdev] Filtering IRP’s
> >
> >
> > > I’m rather new to driver development, so can you say a few words about
> the
> > > following scheme of IRP’s processing ?
> > >
> > > 1. I do attach to a device
> > > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > > 3. I ALWAYS use IoSkipCurrentStackLocation
> > > 4. If I need to have CompletionRoutine, I remember the real CRaddress,
> set
> > > my own CR and will call real CR in my own CR (if realCR == NULL, I will
> > > call only my own CR)
> > >
> > > I think this should work, but I’m not absolutely sure about it …
> > > what can you say ?
> > >
> > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@okena.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Max,

What do you mean by “SRV’s registry”? Is there a registry key that sets the default number of
stack locations in an IRP?

Dave

“Maxim S. Shatskih” wrote:

For me, it would be better to patch SRV’s registry to increase the number of stack locations.

Max

----- Original Message -----
From: “foxgen”
> To: “NT Developers Interest List”
> Sent: Monday, December 17, 2001 12:01 PM
> Subject: [ntdev] Re: Filtering IRP’s
>
> > If you’re attaching to tcp, udp, ip - you will encounter with
> > StackLocations-problem …
> > You will have to control boot-order of your driver, or use proxy-scheme of
> > your driver …
> >
> > the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but my
> > scheme needs less memory…
> >
> > So, do you think the scheme, I proposed is not good ?
> >
> > Foxgen.
> >
> > > Why bother with such non-trivialities?
> > > Why not create one more stack location and use
> > IoCopyCurrentIrpStackLocationToNext?
> > >
> > > Max
> > >
> > > ----- Original Message -----
> > > From: “foxgen”
> > > To: “NT Developers Interest List”
> > > Sent: Friday, December 14, 2001 12:34 PM
> > > Subject: [ntdev] Filtering IRP’s
> > >
> > >
> > > > I’m rather new to driver development, so can you say a few words about
> > the
> > > > following scheme of IRP’s processing ?
> > > >
> > > > 1. I do attach to a device
> > > > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > > > 3. I ALWAYS use IoSkipCurrentStackLocation
> > > > 4. If I need to have CompletionRoutine, I remember the real CRaddress,
> > set
> > > > my own CR and will call real CR in my own CR (if realCR == NULL, I will
> > > > call only my own CR)
> > > >
> > > > I think this should work, but I’m not absolutely sure about it …
> > > > what can you say ?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@okena.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Can you say, in which case my scheme will not work ?
What order should there be to make system work in wrong way ?

I think, that everything is ok … At least if you installed 2 similar
drivers, working like I said, everything would work ok, I guess … Dont you
think so ?

I do not recommend your scheme. You cannot assume that your driver is the
only
3rd party driver that opens \device\tcpip. For example, anti-virus
programs that
perform content scanning may be in the stack as well. If another driver
implements the same scheme as you propose, depending on load order, either
your
driver’s completion routine or the other driver’s completion routine will
be
skipped.

The MS drivers that open tcpip are netbt and afd. As far as I know, afd,
netbt,
and tcpip are implemented as legacy drivers (winnt style) through the
release of
XP. Therefore, you can enforce load order by using a tag value in the
registry.

Dave

foxgen wrote:

> If you’re attaching to tcp, udp, ip - you will encounter with
> StackLocations-problem …
> You will have to control boot-order of your driver, or use proxy-scheme
of
> your driver …
>
> the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but
my
> scheme needs less memory…
>
> So, do you think the scheme, I proposed is not good ?
>
> Foxgen.
>
> > Why bother with such non-trivialities?
> > Why not create one more stack location and use
> IoCopyCurrentIrpStackLocationToNext?
> >
> > Max
> >
> > ----- Original Message -----
> > From: “foxgen”
> > > To: “NT Developers Interest List”
> > > Sent: Friday, December 14, 2001 12:34 PM
> > > Subject: [ntdev] Filtering IRP’s
> > >
> > >
> > > > I’m rather new to driver development, so can you say a few words
about
> > the
> > > > following scheme of IRP’s processing ?
> > > >
> > > > 1. I do attach to a device
> > > > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > > > 3. I ALWAYS use IoSkipCurrentStackLocation
> > > > 4. If I need to have CompletionRoutine, I remember the real
CRaddress,
> > set
> > > > my own CR and will call real CR in my own CR (if realCR == NULL, I
will
> > > > call only my own CR)
> > > >
> > > > I think this should work, but I’m not absolutely sure about it …
> > > > what can you say ?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@okena.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@yandex.ru
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are correct. Actually, your method protects you against other drivers that
do not account for load ordering. I ran into a situation where I enforced my
load order; I loaded immediately above tcpip. Then I installed an AV driver that
did not account for load order and therefore loaded after netbt. My problem was
that I did not have an available stack location. I think the AV driver doesn’t
have a problem when it is the only driver between netbt and tcpip because netbt
creates IRPs with an additional stack location by default.

Dave

foxgen wrote:

Can you say, in which case my scheme will not work ?
What order should there be to make system work in wrong way ?

I think, that everything is ok … At least if you installed 2 similar
drivers, working like I said, everything would work ok, I guess … Dont you
think so ?

> I do not recommend your scheme. You cannot assume that your driver is the
only
> 3rd party driver that opens \device\tcpip. For example, anti-virus
programs that
> perform content scanning may be in the stack as well. If another driver
> implements the same scheme as you propose, depending on load order, either
your
> driver’s completion routine or the other driver’s completion routine will
be
> skipped.
>
> The MS drivers that open tcpip are netbt and afd. As far as I know, afd,
netbt,
> and tcpip are implemented as legacy drivers (winnt style) through the
release of
> XP. Therefore, you can enforce load order by using a tag value in the
registry.
>
> Dave
>
> foxgen wrote:
>
> > If you’re attaching to tcp, udp, ip - you will encounter with
> > StackLocations-problem …
> > You will have to control boot-order of your driver, or use proxy-scheme
of
> > your driver …
> >
> > the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but
my
> > scheme needs less memory…
> >
> > So, do you think the scheme, I proposed is not good ?
> >
> > Foxgen.
> >
> > > Why bother with such non-trivialities?
> > > Why not create one more stack location and use
> > IoCopyCurrentIrpStackLocationToNext?
> > >
> > > Max
> > >
> > > ----- Original Message -----
> > > From: “foxgen”
> > > > To: “NT Developers Interest List”
> > > > Sent: Friday, December 14, 2001 12:34 PM
> > > > Subject: [ntdev] Filtering IRP’s
> > > >
> > > >
> > > > > I’m rather new to driver development, so can you say a few words
> about
> > > the
> > > > > following scheme of IRP’s processing ?
> > > > >
> > > > > 1. I do attach to a device
> > > > > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > > > > 3. I ALWAYS use IoSkipCurrentStackLocation
> > > > > 4. If I need to have CompletionRoutine, I remember the real
> CRaddress,
> > > set
> > > > > my own CR and will call real CR in my own CR (if realCR == NULL, I
> will
> > > > > call only my own CR)
> > > > >
> > > > > I think this should work, but I’m not absolutely sure about it …
> > > > > what can you say ?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > —
> > > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@okena.com
> > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@okena.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> The MS drivers that open tcpip are netbt and afd.

SRV and MRXSMB also.
Starting with w2k, SMB is allowed to talk via TCP directly without NetBT.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes, there was such a key for SRV which governs the number of IRP stack locations for IRPs sent by SRV. Scan the SRV binary for
strings to find the value’s name or read the Resource Kit.
I only do not remember whether this is for IRPs sent to the filesystems or for TDI IRPs or both.

Max

----- Original Message -----
From: “Dave McCowan”
To: “NT Developers Interest List”
Sent: Monday, December 17, 2001 4:13 PM
Subject: [ntdev] Re: Filtering IRP’s

> Max,
>
> What do you mean by “SRV’s registry”? Is there a registry key that sets the default number of
> stack locations in an IRP?
>
> Dave
>
> “Maxim S. Shatskih” wrote:
>
> > For me, it would be better to patch SRV’s registry to increase the number of stack locations.
> >
> > Max
> >
> > ----- Original Message -----
> > From: “foxgen”
> > To: “NT Developers Interest List”
> > Sent: Monday, December 17, 2001 12:01 PM
> > Subject: [ntdev] Re: Filtering IRP’s
> >
> > > If you’re attaching to tcp, udp, ip - you will encounter with
> > > StackLocations-problem …
> > > You will have to control boot-order of your driver, or use proxy-scheme of
> > > your driver …
> > >
> > > the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but my
> > > scheme needs less memory…
> > >
> > > So, do you think the scheme, I proposed is not good ?
> > >
> > > Foxgen.
> > >
> > > > Why bother with such non-trivialities?
> > > > Why not create one more stack location and use
> > > IoCopyCurrentIrpStackLocationToNext?
> > > >
> > > > Max
> > > >
> > > > ----- Original Message -----
> > > > From: “foxgen”
> > > > To: “NT Developers Interest List”
> > > > Sent: Friday, December 14, 2001 12:34 PM
> > > > Subject: [ntdev] Filtering IRP’s
> > > >
> > > >
> > > > > I’m rather new to driver development, so can you say a few words about
> > > the
> > > > > following scheme of IRP’s processing ?
> > > > >
> > > > > 1. I do attach to a device
> > > > > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > > > > 3. I ALWAYS use IoSkipCurrentStackLocation
> > > > > 4. If I need to have CompletionRoutine, I remember the real CRaddress,
> > > set
> > > > > my own CR and will call real CR in my own CR (if realCR == NULL, I will
> > > > > call only my own CR)
> > > > >
> > > > > I think this should work, but I’m not absolutely sure about it …
> > > > > what can you say ?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > —
> > > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > >
> > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@okena.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes, maybe.

At least I would recommend to save the whole IRP stack location and not only the completion routine pointer.
Also call the saved completion routine directly from your one after restoring the IrpSp and do not rely on IoCompleteRequest to do
this.
This will make things presumably safe, but well - where will you save the IrpSp? You will need anyway a place to do this, so why not
just leave it in the IRP as it was?

BTW - your current stack location’s Parameters field is a great place to hold your driver’s temporary data while sending the IRP
down to the next driver. You have 4 ULONGs or even 4 ULONG_PTRs there. It is as safe as using the function parameters as local
variables and update them in C.
You can also store any pointer to CurrentLoc->DeviceObject - it will be then passed as DeviceObject to the completion routine.

IIRC SFILTER sample used trick.

Max

----- Original Message -----
From: “foxgen”
To: “NT Developers Interest List”
Sent: Monday, December 17, 2001 4:46 PM
Subject: [ntdev] Re: Filtering IRP’s

> Can you say, in which case my scheme will not work ?
> What order should there be to make system work in wrong way ?
>
> I think, that everything is ok … At least if you installed 2 similar
> drivers, working like I said, everything would work ok, I guess … Dont you
> think so ?
>
> > I do not recommend your scheme. You cannot assume that your driver is the
> only
> > 3rd party driver that opens \device\tcpip. For example, anti-virus
> programs that
> > perform content scanning may be in the stack as well. If another driver
> > implements the same scheme as you propose, depending on load order, either
> your
> > driver’s completion routine or the other driver’s completion routine will
> be
> > skipped.
> >
> > The MS drivers that open tcpip are netbt and afd. As far as I know, afd,
> netbt,
> > and tcpip are implemented as legacy drivers (winnt style) through the
> release of
> > XP. Therefore, you can enforce load order by using a tag value in the
> registry.
> >
> > Dave
> >
> > foxgen wrote:
> >
> > > If you’re attaching to tcp, udp, ip - you will encounter with
> > > StackLocations-problem …
> > > You will have to control boot-order of your driver, or use proxy-scheme
> of
> > > your driver …
> > >
> > > the scheme, I proposed looks like proxy-scheme(to my mind … :slight_smile: ), but
> my
> > > scheme needs less memory…
> > >
> > > So, do you think the scheme, I proposed is not good ?
> > >
> > > Foxgen.
> > >
> > > > Why bother with such non-trivialities?
> > > > Why not create one more stack location and use
> > > IoCopyCurrentIrpStackLocationToNext?
> > > >
> > > > Max
> > > >
> > > > ----- Original Message -----
> > > > From: “foxgen”
> > > > To: “NT Developers Interest List”
> > > > Sent: Friday, December 14, 2001 12:34 PM
> > > > Subject: [ntdev] Filtering IRP’s
> > > >
> > > >
> > > > > I’m rather new to driver development, so can you say a few words
> about
> > > the
> > > > > following scheme of IRP’s processing ?
> > > > >
> > > > > 1. I do attach to a device
> > > > > 2. I set mydevice->StackSize = lowerdevice.StackSize
> > > > > 3. I ALWAYS use IoSkipCurrentStackLocation
> > > > > 4. If I need to have CompletionRoutine, I remember the real
> CRaddress,
> > > set
> > > > > my own CR and will call real CR in my own CR (if realCR == NULL, I
> will
> > > > > call only my own CR)
> > > > >
> > > > > I think this should work, but I’m not absolutely sure about it …
> > > > > what can you say ?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > —
> > > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@okena.com
> > > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@yandex.ru
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com