How to: Identify the Target Device(Physical) at the Filter Level

Hi Everybody,

I want to design a Filter Driver which is for Encrypting and Decrypting of
Data residing in the peripehral devices
(CDROM, WRITER ,Memory Cards) and also in the
Local Volumes.

I want to know how to recognize at the Upper Filter Level(i.e. above all
File System Drivers) that the volume
which wants to get mounted(through listening to IRP_MJ_MOUNTVOLUME) is
actually residing in
CDROM, WRITER, Local Hard disk etc.

Problem Scenario: I have three drives for eg.
CD-rom
CD-Writer
USB Writer

I want to decrypt or encrypt data residing only in the volume when mounted
in the CD-Writer and not on other
devices. So, if a CDFS formatted volume is inserted into
any of the three devices, the Filter Drvier will get to
know about it but I want to attach to the CDFS FSD only WHEN the mounted
volume is on the WRITER .
How do i find this information???

Thanking in Advance for the Help.

Bye
Biswaroop

Hi!

1., in IRP_MN_MOUNT_VOLUME look for the “RealDevice” pointer: pCurrentStackLocation->Parameters.MountVolume.Vpb->RealDevice

  1. Get the device-name of RealDevice: you can do that by using “ObQueryNameString”

  2. Compare the device-name with the one of your writer.

That should work!

“Windows File Systems Devs Interest List” schrieb am 20.10.03 13:31:47:
>
> Hi Everybody,
>
> I want to design a Filter Driver which is for Encrypting and Decrypting of
> Data residing in the peripehral devices
> (CDROM, WRITER ,Memory Cards) and also in the
> Local Volumes.
>
> I want to know how to recognize at the Upper Filter Level(i.e. above all
> File System Drivers) that the volume
> which wants to get mounted(through listening to IRP_MJ_MOUNTVOLUME) is
> actually residing in
> CDROM, WRITER, Local Hard disk etc.
>
> Problem Scenario: I have three drives for eg.
> CD-rom
> CD-Writer
> USB Writer
>
> I want to decrypt or encrypt data residing only in the volume when mounted
> in the CD-Writer and not on other
> devices. So, if a CDFS formatted volume is inserted into
> any of the three devices, the Filter Drvier will get to
> know about it but I want to attach to the CDFS FSD only WHEN the mounted
> volume is on the WRITER .
> How do i find this information???
>
> Thanking in Advance for the Help.
>
> Bye
> Biswaroop
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@clever.ms
> To unsubscribe send a blank email to xxxxx@lists.osr.com

You can try hooking the required drives.

Sincerely
ML

----- Original Message -----
From: “Bisban”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, October 21, 2003 5:19 AM
Subject: [ntfsd] How to: Identify the Target Device(Physical) at the Filter
Level

> Hi Everybody,
>
> I want to design a Filter Driver which is for Encrypting and Decrypting of
> Data residing in the peripehral devices
> (CDROM, WRITER ,Memory Cards) and also in the
> Local Volumes.
>
> I want to know how to recognize at the Upper Filter Level(i.e. above all
> File System Drivers) that the volume
> which wants to get mounted(through listening to IRP_MJ_MOUNTVOLUME) is
> actually residing in
> CDROM, WRITER, Local Hard disk etc.
>
> Problem Scenario: I have three drives for eg.
> CD-rom
> CD-Writer
> USB Writer
>
> I want to decrypt or encrypt data residing only in the volume when mounted
> in the CD-Writer and not on other
> devices. So, if a CDFS formatted volume is inserted into
> any of the three devices, the Filter Drvier will get to
> know about it but I want to attach to the CDFS FSD only WHEN the mounted
> volume is on the WRITER .
> How do i find this information???
>
> Thanking in Advance for the Help.
>
> Bye
> Biswaroop
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@integramicro.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>