Hi Maxim,
Sorry for being dense, but I don’t understand…
In my IRP read/write function, how can I tell where the IRP came from
using the device extension? I assumed that there would be some clue in
the IRP or stack location(s)… I need to decide whether or not to
process the IRP against the logical volume or simply pass it down to the
disk unaltered…
Thanks,
-bob
Maxim S. Shatskih wrote:
Do this by analyzing your device extension. It can either have a virtual
method table for IRP dispatch, or a signature the “device kind”.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From:
>To: “Windows System Software Devs Interest List”
>Sent: Wednesday, November 30, 2005 7:13 PM
>Subject: [ntdev] Determining where an IRP came from
>
>
>Greetings all,
>
>I have the beginnings of a volume manager… it’s currently implemented as
>a legacy filter driver.
>
>The driver currently attaches to the io stacks of the disk devices in
>order to do I/O to them. The driver also exports a virtual disk
>interface via a symlink to it’s device object.
>
>Question: Since ALL I/O to the disks will pass through my driver, I need
>to identify which one’s come in via my virtual device versus which ones
>come in via applications that do I/O to the disks directly… What’s the
>best way to do this?
>
>Thanks in advance,
>-bob
>
You dispatch routines get the DEVICE_OBJECT and the IRP, so use your device
object to decide what to do with the call. As Max suggested, putting a
pointer into the extension that points to the routine that does real work
for the IRP is one approach. Basically, you set your DRIVER_OBJECTS
dispatch functions to a global handler which then calls the particular
function based on the device extensions pointer.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
wrote in message news:xxxxx@ntdev…
Hi Maxim,
Sorry for being dense, but I don’t understand…
In my IRP read/write function, how can I tell where the IRP came from
using the device extension? I assumed that there would be some clue in
the IRP or stack location(s)… I need to decide whether or not to
process the IRP against the logical volume or simply pass it down to the
disk unaltered…
Thanks,
-bob
Maxim S. Shatskih wrote:
> Do this by analyzing your device extension. It can either have a
> virtual
>method table for IRP dispatch, or a signature the “device kind”.
>
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>xxxxx@storagecraft.com
>http://www.storagecraft.com
>
>----- Original Message -----
>From:
>To: “Windows System Software Devs Interest List”
>Sent: Wednesday, November 30, 2005 7:13 PM
>Subject: [ntdev] Determining where an IRP came from
>
>
>Greetings all,
>
>I have the beginnings of a volume manager… it’s currently implemented as
>a legacy filter driver.
>
>The driver currently attaches to the io stacks of the disk devices in
>order to do I/O to them. The driver also exports a virtual disk
>interface via a symlink to it’s device object.
>
>Question: Since ALL I/O to the disks will pass through my driver, I need
>to identify which one’s come in via my virtual device versus which ones
>come in via applications that do I/O to the disks directly… What’s the
>best way to do this?
>
>Thanks in advance,
>-bob
>
The device object is a parameter to your dispatch routine.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Cc: “Windows System Software Devs Interest List”
Sent: Wednesday, November 30, 2005 9:20 PM
Subject: Re: [ntdev] IOCTL help
Hi Maxim,
Sorry for being dense, but I don’t understand…
In my IRP read/write function, how can I tell where the IRP came from
using the device extension? I assumed that there would be some clue in
the IRP or stack location(s)… I need to decide whether or not to
process the IRP against the logical volume or simply pass it down to the
disk unaltered…
Thanks,
-bob
Maxim S. Shatskih wrote:
> Do this by analyzing your device extension. It can either have a virtual
>method table for IRP dispatch, or a signature the “device kind”.
>
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>xxxxx@storagecraft.com
>http://www.storagecraft.com
>
>----- Original Message -----
>From:
>To: “Windows System Software Devs Interest List”
>Sent: Wednesday, November 30, 2005 7:13 PM
>Subject: [ntdev] Determining where an IRP came from
>
>
>Greetings all,
>
>I have the beginnings of a volume manager… it’s currently implemented as
>a legacy filter driver.
>
>The driver currently attaches to the io stacks of the disk devices in
>order to do I/O to them. The driver also exports a virtual disk
>interface via a symlink to it’s device object.
>
>Question: Since ALL I/O to the disks will pass through my driver, I need
>to identify which one’s come in via my virtual device versus which ones
>come in via applications that do I/O to the disks directly… What’s the
>best way to do this?
>
>Thanks in advance,
>-bob
>
—
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