In my filter driver when I get the name of the file associated with a FileObject , I am not getting the driver letter. Instead i am getting something like below.
\device\Harddiskvolume2\MyFile.txt
I am using “ObQuerynameString” to get the name .
Actually I wanted the name to be D:\MyFile.txt
Does any one experience this kind of problem? Any suggestions please?
PRIYA MS
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
Look at FilesSpy example in DDK use SpyGetFullPathName function . Take
care to set the lookupFlags.
Like
SetFlag( lookupFlags, NLFL_IN_CREATE );
Hope it helps.
anurag
-----Original Message-----
From: NTFSD NTDEV [mailto:xxxxx@yahoo.com]
Sent: Monday, November 08, 2004 3:04 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Regarding the Filename
In my filter driver when I get the name of the file associated with a
FileObject , I am not getting the driver letter. Instead i am getting
something like below.
\device\Harddiskvolume2\MyFile.txt
I am using “ObQuerynameString” to get the name .
Actually I wanted the name to be D:\MyFile.txt
Does any one experience this kind of problem? Any suggestions please?
PRIYA MS
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com — Questions? First
check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are
currently subscribed to ntfsd as: xxxxx@divassoftware.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
> Does any one experience this kind of problem? Any suggestions please?
This is not a problem, this is by design.
In the layer of FS drivers and filters, (in fact, in the layer
of native API), there are no drive letters.
There are volume names. More drive letters
could be assigned to one volume, but a volume
must not have a drive letter at all.
You may use RtlVolumeNameToDosDevice,
but above rules apply to it as well.
L.
In addition to the other suggestion, you must be able to handle the case
where there is no drive letter. I routinely configure my system so that
I have only one drive letter, with other volumes connected via mount
points. If your filter can’t handle that configuration, it will likely
break in production environments.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com http:</http:>
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of NTFSD NTDEV
Sent: Monday, November 08, 2004 4:34 AM
To: ntfsd redirect
Subject: [ntfsd] Regarding the Filename
In my filter driver when I get the name of the file associated with a
FileObject , I am not getting the driver letter. Instead i am getting
something like below.
\device\Harddiskvolume2\MyFile.txt
I am using “ObQuerynameString” to get the name .
Actually I wanted the name to be D:\MyFile.txt
Does any one experience this kind of problem? Any suggestions please?
PRIYA MS
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com — Questions? First
check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are
currently subscribed to ntfsd as: xxxxx@osr.com To unsubscribe send a
blank email to xxxxx@lists.osr.com