Hi,
Is it is correct if i get the pointer to the caller¡¯s stack location ( by
using IoGetCurrentIrpStackLocation) and using that device object of caller’s
stack, can i call the RtlVolumeDeviceToDosName to get the drive Name?
With Regards,
A.Ilamparithi
“Neal Christiansen” wrote in message
news:xxxxx@ntfsd…
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 Brilly Wu (HangZhou)
Sent: Tuesday, July 06, 2004 10:01 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] ??: [ntfsd] How to get driver letter from
\Device\HarddiskVolume1
But how to use it?
status = IoVolumeDeviceToDosName(
irpSp->FileObject->DeviceObject,dosName);
DBGD1( “IoVolumeDeviceToDosName return status
”,status );
if (NT_SUCCESS( status ) )
{
DBGPUS( dosName );
ExFreePool( dosName );
}
It blue screen.
-----ÓʼþÔ¼þ-----
·¢¼þÈË: Prokash Sinha [mailto:xxxxx@garlic.com]
·¢ËÍʱ¼ä: 2004Äê7ÔÂ7ÈÕ 12:03
ÊÕ¼þÈË: Windows File Systems Devs Interest List
Ö÷Ìâ: RE:
[ntfsd] How to get driver letter from \Device\HarddiskVolume1
IoVolumeDeviceToDosName().
-pro
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of cnmmd
Sent: Tuesday, July 06, 2004 6:45 PM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] [ntfsd] How to get driver letter from
\Device\HarddiskVolume1
A F.S. filter driver,In the IRP_CREATE routine,the file path is such as
\Device\HarddiskVolumeX\xxxx
How to translate it to C:\xxxx?
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@garlic.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@viatech.com.cn
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