How to get the logical driver name from the internal device name?

Hello,

A file system filter driver can get a file’s volume name such as
\Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1.
But the user mode APIs needs a file’s logical name such as C: or D:.
Is there a function in kernel mode to translate the physical volume name to
the logical name?

Thanks,

Shangwu

Query the objects name for the deivce.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shangwu
Sent: Tuesday, February 24, 2004 1:25 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] How to get the logical driver name from the internal device
name?

Hello,

A file system filter driver can get a file’s volume name such as
\Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1.
But the user mode APIs needs a file’s logical name such as C: or D:.
Is there a function in kernel mode to translate the physical volume name to
the logical name?

Thanks,

Shangwu


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

You can use IoVolumeDeviceToDosName or RtlVolumeDeviceToDosName to get a
drive letter if one exists.

Alternatively User mode application can use the device name directly: you
can use NtCreateFile instead of CreateFile or you can use DefineDosDevice to
create a symbolic link that can be used in CreateFile.

Alexei.

“Shangwu” wrote in message news:xxxxx@ntfsd…
> Hello,
>
> A file system filter driver can get a file’s volume name such as
> \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1.
> But the user mode APIs needs a file’s logical name such as C: or D:.
> Is there a function in kernel mode to translate the physical volume name
to
> the logical name?
>
> Thanks,
>
> Shangwu
>
>
>

Alexei,

Thank you very much for the information.

Shangwu

“Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
> You can use IoVolumeDeviceToDosName or RtlVolumeDeviceToDosName to get a
> drive letter if one exists.
>
> Alternatively User mode application can use the device name directly: you
> can use NtCreateFile instead of CreateFile or you can use DefineDosDevice
to
> create a symbolic link that can be used in CreateFile.
>
> Alexei.
>
> “Shangwu” wrote in message news:xxxxx@ntfsd…
> > Hello,
> >
> > A file system filter driver can get a file’s volume name such as
> > \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1.
> > But the user mode APIs needs a file’s logical name such as C: or D:.
> > Is there a function in kernel mode to translate the physical volume name
> to
> > the logical name?
> >
> > Thanks,
> >
> > Shangwu
> >
> >
> >
>
>
>