How to get the originator of an IRP DeviceObject( actually device type) if possible

Hi all,

I have two drivers talking to each other for registration trough IOCTL
that one driver initiate and send and get handled by the other driver in
IRP_MJ_INTERNAL_DEVICE_CONTROL.

I want to distinguish/recognize between my DeviceObject (easy) , my
other driver DeviceObject that send that ioctl(my difficulty) and other
DeviceObject that only pass-through and I should
SkipCurrentIrpStackLocation & IoCallDriver for them.

Who can I do this distinguishing? I was thinking of using the
DeviceObject DeviceType (which is a constant self defined value(x8301),
that I set for that other device while I’m calling IoCreateDevice), if
it’s possible, and reasonable solution, can you help me get to that
value through the dispatch normal given args or give me some other way
or refer me to some example…

Thanks,

Daniel.

How can i get the originator of an IRP DeviceObject( actually device
type)

xxxxx@gmail.com

Get the latest news on SurfControl and our products,
subscribe to our monthly e-newsletter, SurfAdvisory at:
http://www.surfcontrol.com/resources/surfadvisory/surfadvisory_signup.aspx

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

Why not use IRP_MJ_PNP/IRP_MN_QUERY_INTERFACE?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Daniel Arosh”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, October 24, 2006 8:35 PM
Subject: [ntfsd] How to get the originator of an IRP DeviceObject( actually
device type) if possible

Hi all,

I have two drivers talking to each other for registration trough IOCTL
that one driver initiate and send and get handled by the other driver in
IRP_MJ_INTERNAL_DEVICE_CONTROL.

I want to distinguish/recognize between my DeviceObject (easy) , my
other driver DeviceObject that send that ioctl(my difficulty) and other
DeviceObject that only pass-through and I should
SkipCurrentIrpStackLocation & IoCallDriver for them.

Who can I do this distinguishing? I was thinking of using the
DeviceObject DeviceType (which is a constant self defined value(x8301),
that I set for that other device while I’m calling IoCreateDevice), if
it’s possible, and reasonable solution, can you help me get to that
value through the dispatch normal given args or give me some other way
or refer me to some example…

Thanks,

Daniel.

How can i get the originator of an IRP DeviceObject( actually device
type)

xxxxx@gmail.com

Get the latest news on SurfControl and our products,
subscribe to our monthly e-newsletter, SurfAdvisory at:
http://www.surfcontrol.com/resources/surfadvisory/surfadvisory_signup.aspx


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



Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Are you talking about file system filters or some arbitrary driver? If these are filters then you can not use your own device type, a filters device object must match the device type of the device object it is attaching to. If they are not attaching to anything then you can probably get away with using your own type though I have never tried doing this.

Do you have one driver that is always guaranteed to be loaded first? I ask because something I have done is have a primary driver and then have other drivers register with the primary via an exported API call. You can then pass the necessary driver objects around and recognize the device objects by what driver object they have.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no Rights

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Arosh
Sent: Tuesday, October 24, 2006 9:35 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] How to get the originator of an IRP DeviceObject( actually device type) if possible

Hi all,
I have two drivers talking to each other for registration trough IOCTL that one driver initiate and send and get handled by the other driver in IRP_MJ_INTERNAL_DEVICE_CONTROL. ?
I want to distinguish/recognize between my DeviceObject (easy) , my other driver DeviceObject that send that ioctl(my difficulty) ?and other DeviceObject that only pass-through and I should SkipCurrentIrpStackLocation & IoCallDriver for them.
Who can I do this distinguishing? I was thinking of using the DeviceObject DeviceType (which is a constant self defined value(x8301), that I set for that other device while I’m calling IoCreateDevice), if it’s possible, and reasonable solution, can you help me get to that value through the dispatch normal given args or give me some other way or refer me to some example…
Thanks,
Daniel.

How can i get the originator of an IRP DeviceObject( actually device type)
xxxxx@gmail.com

Get?the?latest?news?on?SurfControl?and?our?products,
subscribe?to?our?monthly?e-newsletter,?SurfAdvisory?at:
http://www.surfcontrol.com/resources/surfadvisory/surfadvisory_signup.aspx

*********************************************************************
The?information?in?this?email?is?confidential?and?may?be?legally
privileged.?It?is?intended?solely?for?the?addressee.?Access?to?this
email?by?anyone?else?is?unauthorized.?If?you?are?not?the?intended
recipient,?any?disclosure,?copying,?distribution?or?any?action?taken
or?omitted?to??be?taken?in?reliance?on?it,?is?prohibited?and?may?be
unlawful.?If?you?believe?that?you?have?received?this?email?in?error,
please?contact?the?sender.
*********************************************************************


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com