Query regarding file object and volumes which is on removable media

Hi,

I am using an API to get the dos name for a file object. In the pre operation callback for IRP_MJ_CREATE path, when I try to get filename, I am only getting filename as Volume DriveLetter. But in post operation callback for IRP_MJ_CREATE path, I am getting expected filename. Is it because the file object has not been constructed fully in pre operation call back?

How to figure out the volume on which file system is mounted is present on the Hard disk/USB disk/Any other removable media in minifilter?

Do I need to figure out from signature of the volume like ?\Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume2" stands for Hard disk?

Mainly I want to differentiate removable and non-removable media.

Thanks in advance!!

[quote]
I am using an API to get the dos name for a file object. In the pre
operation callback for IRP_MJ_CREATE path, when I try to get filename, I am
only getting filename as Volume DriveLetter. But in post operation callback
for IRP_MJ_CREATE path, I am getting expected filename. Is it because the
file object has not been constructed fully in pre operation call back?

[quote]

No, you can actually get full path name in pre create, there are just many
cases you have to watch out for, such as relative opens, don’t use
ObQueryNameString because of deadlock, some files might be opened by id,
etc.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.co.in
Sent: Friday, August 29, 2008 9:37 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Query regarding file object and volumes which is on
removable media

Hi,

I am using an API to get the dos name for a file object. In the pre
operation callback for IRP_MJ_CREATE path, when I try to get filename, I am
only getting filename as Volume DriveLetter. But in post operation callback
for IRP_MJ_CREATE path, I am getting expected filename. Is it because the
file object has not been constructed fully in pre operation call back?

How to figure out the volume on which file system is mounted is present on
the Hard disk/USB disk/Any other removable media in minifilter?

Do I need to figure out from signature of the volume like
?\Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume2" stands for Hard
disk?

Mainly I want to differentiate removable and non-removable media.

Thanks in advance!!


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

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