Getting Filename!

Hi All,

I need to develope a filter driver in Windows 2000.

At the driver level, i need to know which files are opened, read, written
and closed.

While i try to do this, Iam not able to get the full file name.

I mean, iam getting the file name without the Drive Name.

Eg.

If the file opened is C:\New\xx.txt, Iam getting the file name as
\New\xx.txt.

Iam getting this info from File_Object’s filename.

Also, for a mapped drive iam getting the drive name properly!

How to get the drive name correctly for other drives?

With Regards,
A.Ilamparithi.

In the world of file system filters, there is no volume/drive name.
Instead of it, there is the FileObject->DeviceObject.
If you need to have the device name, you have to
query the name of the device using ObQueryNameString.

L.

FileName is you get is relative to the device object
your filter driver is attached to. In this case it is
the device object for C:\ i.e.
\device\harddisk0\partition1. You can get the name for
this device object to make a complete path
\device\harddisk0\partition1\New\xx.txt.

Rushi.

— “A.Ilamparithi” wrote:
> Hi All,
>
> I need to develope a filter driver in Windows 2000.
>
> At the driver level, i need to know which files are
> opened, read, written
> and closed.
>
> While i try to do this, Iam not able to get the full
> file name.
>
> I mean, iam getting the file name without the Drive
> Name.
>
> Eg.
>
> If the file opened is C:\New\xx.txt, Iam getting the
> file name as
> \New\xx.txt.
>
> Iam getting this info from File_Object’s filename.
>
> Also, for a mapped drive iam getting the drive name
> properly!
>
> How to get the drive name correctly for other
> drives?
>
> With Regards,
> A.Ilamparithi.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Hi,

I got the device Name using ObQueryNameString.

But how to convert it back to Drive Name?

I tried using RtlVolumeDeviceToDosName.

But, it always results in the Blue Screen of Death.

Thanks & Regards,
A.Ilamparithi.

“Ladislav Zezula” wrote in message news:xxxxx@ntfsd…
> In the world of file system filters, there is no volume/drive name.
> Instead of it, there is the FileObject->DeviceObject.
> If you need to have the device name, you have to
> query the name of the device using ObQueryNameString.
>
> L.
>
>

Relying on drive letters in any kernel mode code is a bad idea.

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

----- Original Message -----
From: “A.Ilamparithi”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Saturday, July 10, 2004 11:48 PM
Subject: Re:[ntfsd] Getting Filename!

> Hi,
>
> I got the device Name using ObQueryNameString.
>
> But how to convert it back to Drive Name?
>
> I tried using RtlVolumeDeviceToDosName.
>
> But, it always results in the Blue Screen of Death.
>
> Thanks & Regards,
> A.Ilamparithi.
>
>
>
> “Ladislav Zezula” wrote in message news:xxxxx@ntfsd…
> > In the world of file system filters, there is no volume/drive name.
> > Instead of it, there is the FileObject->DeviceObject.
> > If you need to have the device name, you have to
> > query the name of the device using ObQueryNameString.
> >
> > L.
> >
> >
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Yes, i can understand that…

But, i need to know from which drive a file is opened…

I use this information, to display to the users and not to do any kernel
mode programming.

Thanks & Regards,
A.Ilamparithi.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> Relying on drive letters in any kernel mode code is a bad idea.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “A.Ilamparithi”
> Newsgroups: ntfsd
> To: “Windows File Systems Devs Interest List”
> Sent: Saturday, July 10, 2004 11:48 PM
> Subject: Re:[ntfsd] Getting Filename!
>
>
> > Hi,
> >
> > I got the device Name using ObQueryNameString.
> >
> > But how to convert it back to Drive Name?
> >
> > I tried using RtlVolumeDeviceToDosName.
> >
> > But, it always results in the Blue Screen of Death.
> >
> > Thanks & Regards,
> > A.Ilamparithi.
> >
> >
> >
> > “Ladislav Zezula” wrote in message news:xxxxx@ntfsd…
> > > In the world of file system filters, there is no volume/drive name.
> > > Instead of it, there is the FileObject->DeviceObject.
> > > If you need to have the device name, you have to
> > > query the name of the device using ObQueryNameString.
> > >
> > > L.
> > >
> > >
> >
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

RtlVolumeDeviceToDosName can help.

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

----- Original Message -----
From: “A.Ilamparithi”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Sunday, July 11, 2004 12:00 AM
Subject: Re:[ntfsd] Re:Getting Filename!

> Yes, i can understand that…
>
> But, i need to know from which drive a file is opened…
>
> I use this information, to display to the users and not to do any kernel
> mode programming.
>
> Thanks & Regards,
> A.Ilamparithi.
>
>
> “Maxim S. Shatskih” wrote in message
> news:xxxxx@ntfsd…
> > Relying on drive letters in any kernel mode code is a bad idea.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > ----- Original Message -----
> > From: “A.Ilamparithi”
> > Newsgroups: ntfsd
> > To: “Windows File Systems Devs Interest List”
> > Sent: Saturday, July 10, 2004 11:48 PM
> > Subject: Re:[ntfsd] Getting Filename!
> >
> >
> > > Hi,
> > >
> > > I got the device Name using ObQueryNameString.
> > >
> > > But how to convert it back to Drive Name?
> > >
> > > I tried using RtlVolumeDeviceToDosName.
> > >
> > > But, it always results in the Blue Screen of Death.
> > >
> > > Thanks & Regards,
> > > A.Ilamparithi.
> > >
> > >
> > >
> > > “Ladislav Zezula” wrote in message news:xxxxx@ntfsd…
> > > > In the world of file system filters, there is no volume/drive name.
> > > > Instead of it, there is the FileObject->DeviceObject.
> > > > If you need to have the device name, you have to
> > > > query the name of the device using ObQueryNameString.
> > > >
> > > > L.
> > > >
> > > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the IFS FAQ at
> > https://www.osronline.com/article.cfm?id=17
> > >
> > > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi,

I tried that…

and i got the Blue screen.

With Thanks & Regards,
A.Ilamparithi.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> RtlVolumeDeviceToDosName can help.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “A.Ilamparithi”
> Newsgroups: ntfsd
> To: “Windows File Systems Devs Interest List”
> Sent: Sunday, July 11, 2004 12:00 AM
> Subject: Re:[ntfsd] Re:Getting Filename!
>
>
> > Yes, i can understand that…
> >
> > But, i need to know from which drive a file is opened…
> >
> > I use this information, to display to the users and not to do any kernel
> > mode programming.
> >
> > Thanks & Regards,
> > A.Ilamparithi.
> >
> >
> > “Maxim S. Shatskih” wrote in message
> > news:xxxxx@ntfsd…
> > > Relying on drive letters in any kernel mode code is a bad idea.
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “A.Ilamparithi”
> > > Newsgroups: ntfsd
> > > To: “Windows File Systems Devs Interest List”
> > > Sent: Saturday, July 10, 2004 11:48 PM
> > > Subject: Re:[ntfsd] Getting Filename!
> > >
> > >
> > > > Hi,
> > > >
> > > > I got the device Name using ObQueryNameString.
> > > >
> > > > But how to convert it back to Drive Name?
> > > >
> > > > I tried using RtlVolumeDeviceToDosName.
> > > >
> > > > But, it always results in the Blue Screen of Death.
> > > >
> > > > Thanks & Regards,
> > > > A.Ilamparithi.
> > > >
> > > >
> > > >
> > > > “Ladislav Zezula” wrote in message
news:xxxxx@ntfsd…
> > > > > In the world of file system filters, there is no volume/drive
name.
> > > > > Instead of it, there is the FileObject->DeviceObject.
> > > > > If you need to have the device name, you have to
> > > > > query the name of the device using ObQueryNameString.
> > > > >
> > > > > L.
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the IFS FAQ at
> > > https://www.osronline.com/article.cfm?id=17
> > > >
> > > > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >
> >
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Then try the correct device object (the disk device object below the FSD).

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

----- Original Message -----
From: “A.Ilamparithi”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Sunday, July 11, 2004 12:19 AM
Subject: Re:[ntfsd] Re:Re:Getting Filename!

> Hi,
>
> I tried that…
>
> and i got the Blue screen.
>
> With Thanks & Regards,
> A.Ilamparithi.
>
> “Maxim S. Shatskih” wrote in message
> news:xxxxx@ntfsd…
> > RtlVolumeDeviceToDosName can help.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > ----- Original Message -----
> > From: “A.Ilamparithi”
> > Newsgroups: ntfsd
> > To: “Windows File Systems Devs Interest List”
> > Sent: Sunday, July 11, 2004 12:00 AM
> > Subject: Re:[ntfsd] Re:Getting Filename!
> >
> >
> > > Yes, i can understand that…
> > >
> > > But, i need to know from which drive a file is opened…
> > >
> > > I use this information, to display to the users and not to do any kernel
> > > mode programming.
> > >
> > > Thanks & Regards,
> > > A.Ilamparithi.
> > >
> > >
> > > “Maxim S. Shatskih” wrote in message
> > > news:xxxxx@ntfsd…
> > > > Relying on drive letters in any kernel mode code is a bad idea.
> > > >
> > > > Maxim Shatskih, Windows DDK MVP
> > > > StorageCraft Corporation
> > > > xxxxx@storagecraft.com
> > > > http://www.storagecraft.com
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: “A.Ilamparithi”
> > > > Newsgroups: ntfsd
> > > > To: “Windows File Systems Devs Interest List”
> > > > Sent: Saturday, July 10, 2004 11:48 PM
> > > > Subject: Re:[ntfsd] Getting Filename!
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > I got the device Name using ObQueryNameString.
> > > > >
> > > > > But how to convert it back to Drive Name?
> > > > >
> > > > > I tried using RtlVolumeDeviceToDosName.
> > > > >
> > > > > But, it always results in the Blue Screen of Death.
> > > > >
> > > > > Thanks & Regards,
> > > > > A.Ilamparithi.
> > > > >
> > > > >
> > > > >
> > > > > “Ladislav Zezula” wrote in message
> news:xxxxx@ntfsd…
> > > > > > In the world of file system filters, there is no volume/drive
> name.
> > > > > > Instead of it, there is the FileObject->DeviceObject.
> > > > > > If you need to have the device name, you have to
> > > > > > query the name of the device using ObQueryNameString.
> > > > > >
> > > > > > L.
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the IFS FAQ at
> > > > https://www.osronline.com/article.cfm?id=17
> > > > >
> > > > > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > > >
> > > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the IFS FAQ at
> > https://www.osronline.com/article.cfm?id=17
> > >
> > > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

When trying to solve a problem it helps if you would look at the
archives because the answers to many questions are there. I answered
this exact question one week ago. The answer is:

This API blue screens if you send it a “file system stack” device
object. You must send it a “storage stack” device object.

You can get this by calling “IoGetDiskDeviceObject()” which will give
you the storage stack device object given a file system stack device
object. This object is returned referenced so be sure and call
ObReleaseObject() when you are done querying the driver letter.

Unfortunately this API does not exist on W2K. To work around this you
would have to load your filter at boot time and save the storage stack
device object in your device object extension as the volumes mount.
Note that both the sfilter and filespy samples in the IFSKit show you
how to save the storage stack device object when a volume mounts.

Note that an appropriate bug has been filed to get the documentation
updated for this API.

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A.Ilamparithi
Sent: Saturday, July 10, 2004 1:20 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Re:Re:Getting Filename!

Hi,

I tried that…

and i got the Blue screen.

With Thanks & Regards,
A.Ilamparithi.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> RtlVolumeDeviceToDosName can help.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “A.Ilamparithi”
> Newsgroups: ntfsd
> To: “Windows File Systems Devs Interest List”
> Sent: Sunday, July 11, 2004 12:00 AM
> Subject: Re:[ntfsd] Re:Getting Filename!
>
>
> > Yes, i can understand that…
> >
> > But, i need to know from which drive a file is opened…
> >
> > I use this information, to display to the users and not to do any
kernel
> > mode programming.
> >
> > Thanks & Regards,
> > A.Ilamparithi.
> >
> >
> > “Maxim S. Shatskih” wrote in message
> > news:xxxxx@ntfsd…
> > > Relying on drive letters in any kernel mode code is a bad
idea.
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “A.Ilamparithi”
> > > Newsgroups: ntfsd
> > > To: “Windows File Systems Devs Interest List”

> > > Sent: Saturday, July 10, 2004 11:48 PM
> > > Subject: Re:[ntfsd] Getting Filename!
> > >
> > >
> > > > Hi,
> > > >
> > > > I got the device Name using ObQueryNameString.
> > > >
> > > > But how to convert it back to Drive Name?
> > > >
> > > > I tried using RtlVolumeDeviceToDosName.
> > > >
> > > > But, it always results in the Blue Screen of Death.
> > > >
> > > > Thanks & Regards,
> > > > A.Ilamparithi.
> > > >
> > > >
> > > >
> > > > “Ladislav Zezula” wrote in message
news:xxxxx@ntfsd…
> > > > > In the world of file system filters, there is no volume/drive
name.
> > > > > Instead of it, there is the FileObject->DeviceObject.
> > > > > If you need to have the device name, you have to
> > > > > query the name of the device using ObQueryNameString.
> > > > >
> > > > > L.
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the IFS FAQ at
> > > https://www.osronline.com/article.cfm?id=17
> > > >
> > > > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> >
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

A.Ilamparithi,

Sorry if I sounded a tad harsh, I hadn’t read that you had seen the
original response.

I saw that you were having additional problems. Did you ever get it
resolved?

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Neal Christiansen
Sent: Monday, July 12, 2004 7:50 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Re:Re:Getting Filename!

When trying to solve a problem it helps if you would look at the
archives because the answers to many questions are there. I answered
this exact question one week ago. The answer is:

This API blue screens if you send it a “file system stack” device
object. You must send it a “storage stack” device object.

You can get this by calling “IoGetDiskDeviceObject()” which will give
you the storage stack device object given a file system stack device
object. This object is returned referenced so be sure and call
ObReleaseObject() when you are done querying the driver letter.

Unfortunately this API does not exist on W2K. To work around this you
would have to load your filter at boot time and save the storage stack
device object in your device object extension as the volumes mount.
Note that both the sfilter and filespy samples in the IFSKit show you
how to save the storage stack device object when a volume mounts.

Note that an appropriate bug has been filed to get the documentation
updated for this API.

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A.Ilamparithi
Sent: Saturday, July 10, 2004 1:20 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Re:Re:Getting Filename!

Hi,

I tried that…

and i got the Blue screen.

With Thanks & Regards,
A.Ilamparithi.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> RtlVolumeDeviceToDosName can help.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “A.Ilamparithi”
> Newsgroups: ntfsd
> To: “Windows File Systems Devs Interest List”
> Sent: Sunday, July 11, 2004 12:00 AM
> Subject: Re:[ntfsd] Re:Getting Filename!
>
>
> > Yes, i can understand that…
> >
> > But, i need to know from which drive a file is opened…
> >
> > I use this information, to display to the users and not to do any
kernel
> > mode programming.
> >
> > Thanks & Regards,
> > A.Ilamparithi.
> >
> >
> > “Maxim S. Shatskih” wrote in message
> > news:xxxxx@ntfsd…
> > > Relying on drive letters in any kernel mode code is a bad
idea.
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “A.Ilamparithi”
> > > Newsgroups: ntfsd
> > > To: “Windows File Systems Devs Interest List”

> > > Sent: Saturday, July 10, 2004 11:48 PM
> > > Subject: Re:[ntfsd] Getting Filename!
> > >
> > >
> > > > Hi,
> > > >
> > > > I got the device Name using ObQueryNameString.
> > > >
> > > > But how to convert it back to Drive Name?
> > > >
> > > > I tried using RtlVolumeDeviceToDosName.
> > > >
> > > > But, it always results in the Blue Screen of Death.
> > > >
> > > > Thanks & Regards,
> > > > A.Ilamparithi.
> > > >
> > > >
> > > >
> > > > “Ladislav Zezula” wrote in message
news:xxxxx@ntfsd…
> > > > > In the world of file system filters, there is no volume/drive
name.
> > > > > Instead of it, there is the FileObject->DeviceObject.
> > > > > If you need to have the device name, you have to
> > > > > query the name of the device using ObQueryNameString.
> > > > >
> > > > > L.
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the IFS FAQ at
> > > https://www.osronline.com/article.cfm?id=17
> > > >
> > > > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> >
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi,

No problem Neal.

No, the problem was not resolved.

Still iam getting the BSOD.

But, I have changed the design of my driver.

Actually, my driver doesnot need the Drive Name. It is only the application
that is talking to me should know the drive name.

So, I have a table in the application which has the drive name and logical
drive name (filled by using QUERYDOSDEVICE).

From driver i will send only the logical name so that application can map to
the corresponding drive name.

It solves my problem.

But iam eager to solve the original problem (RtlVolumeDeviceToDosName).

:slight_smile:

With Thanks,
A.Ilamparithi.

“Neal Christiansen” wrote in message
news:xxxxx@ntfsd…
A.Ilamparithi,

Sorry if I sounded a tad harsh, I hadn’t read that you had seen the
original response.

I saw that you were having additional problems. Did you ever get it
resolved?

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Neal Christiansen
Sent: Monday, July 12, 2004 7:50 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Re:Re:Getting Filename!

When trying to solve a problem it helps if you would look at the
archives because the answers to many questions are there. I answered
this exact question one week ago. The answer is:

This API blue screens if you send it a “file system stack” device
object. You must send it a “storage stack” device object.

You can get this by calling “IoGetDiskDeviceObject()” which will give
you the storage stack device object given a file system stack device
object. This object is returned referenced so be sure and call
ObReleaseObject() when you are done querying the driver letter.

Unfortunately this API does not exist on W2K. To work around this you
would have to load your filter at boot time and save the storage stack
device object in your device object extension as the volumes mount.
Note that both the sfilter and filespy samples in the IFSKit show you
how to save the storage stack device object when a volume mounts.

Note that an appropriate bug has been filed to get the documentation
updated for this API.

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A.Ilamparithi
Sent: Saturday, July 10, 2004 1:20 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Re:Re:Getting Filename!

Hi,

I tried that…

and i got the Blue screen.

With Thanks & Regards,
A.Ilamparithi.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> RtlVolumeDeviceToDosName can help.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “A.Ilamparithi”
> Newsgroups: ntfsd
> To: “Windows File Systems Devs Interest List”
> Sent: Sunday, July 11, 2004 12:00 AM
> Subject: Re:[ntfsd] Re:Getting Filename!
>
>
> > Yes, i can understand that…
> >
> > But, i need to know from which drive a file is opened…
> >
> > I use this information, to display to the users and not to do any
kernel
> > mode programming.
> >
> > Thanks & Regards,
> > A.Ilamparithi.
> >
> >
> > “Maxim S. Shatskih” wrote in message
> > news:xxxxx@ntfsd…
> > > Relying on drive letters in any kernel mode code is a bad
idea.
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “A.Ilamparithi”
> > > Newsgroups: ntfsd
> > > To: “Windows File Systems Devs Interest List”

> > > Sent: Saturday, July 10, 2004 11:48 PM
> > > Subject: Re:[ntfsd] Getting Filename!
> > >
> > >
> > > > Hi,
> > > >
> > > > I got the device Name using ObQueryNameString.
> > > >
> > > > But how to convert it back to Drive Name?
> > > >
> > > > I tried using RtlVolumeDeviceToDosName.
> > > >
> > > > But, it always results in the Blue Screen of Death.
> > > >
> > > > Thanks & Regards,
> > > > A.Ilamparithi.
> > > >
> > > >
> > > >
> > > > “Ladislav Zezula” wrote in message
news:xxxxx@ntfsd…
> > > > > In the world of file system filters, there is no volume/drive
name.
> > > > > Instead of it, there is the FileObject->DeviceObject.
> > > > > If you need to have the device name, you have to
> > > > > query the name of the device using ObQueryNameString.
> > > > >
> > > > > L.
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the IFS FAQ at
> > > https://www.osronline.com/article.cfm?id=17
> > > >
> > > > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> >
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com