Getting full path from short name

I am developing a file system filter driver for NT/2000/XP/2003 windows
os. In the IRP_MJ_CREATE dispatch filter I sometimes get the ms dos 8.3
file version such as - progra~1 and so. I need to get the full name of
that 8.3 file format - how can I do that? I need to find the follwing:

  1. What is the best way to no if the file name I get is the short or the
    full name?
  2. If I get the 8.3 file format how can I find the full file name?

Again I need this to work on all 4 os.

Thanks,
Ronen

Ronen,
I think the only way that you can be sure to get the LFN is to
ask the parent directory with ZwQueryDirectoryFile or some other method.
A shortcut to knowing if you have a LFN is to call
RtlIsNameLegalDOS8Dot3 with the name, and if the name is not a legal 8.3
name, then you know it is a LFN.

Matt

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of R
Sent: Monday, November 17, 2003 9:28 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Getting full path from short name

I am developing a file system filter driver for NT/2000/XP/2003 windows
os. In the IRP_MJ_CREATE dispatch filter I sometimes get the ms dos 8.3
file version such as - progra~1 and so. I need to get the full name of
that 8.3 file format - how can I do that? I need to find the follwing:

  1. What is the best way to no if the file name I get is the short or the
    full name?
  2. If I get the 8.3 file format how can I find the full file name?

Again I need this to work on all 4 os.

Thanks,
Ronen


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

Thanks,

How do I call ZwQueryDirectoryFile? I will get reentrance issue in the
filter driver. Which is the best way to handle this situation - I know
that nav app causes bug check when using reentrance in filter driver?

Ronen

Ronen,
I think the only way that you can be sure to get the LFN is to
ask the parent directory with ZwQueryDirectoryFile or some other method.
A shortcut to knowing if you have a LFN is to call
RtlIsNameLegalDOS8Dot3 with the name, and if the name is not a legal 8.3
name, then you know it is a LFN.

Matt

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of R
Sent: Monday, November 17, 2003 9:28 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Getting full path from short name

I am developing a file system filter driver for NT/2000/XP/2003 windows
os. In the IRP_MJ_CREATE dispatch filter I sometimes get the ms dos 8.3
file version such as - progra~1 and so. I need to get the full name of
that 8.3 file format - how can I do that? I need to find the follwing:

  1. What is the best way to no if the file name I get is the short or the
    full name?
  2. If I get the 8.3 file format how can I find the full file name?

Again I need this to work on all 4 os.

Thanks,
Ronen


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

Probably the easiest way to deal with it is use a shadow device… Check
out the OSR’s filesystem driver FAQ.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of R
Sent: Monday, November 17, 2003 10:29 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] RE: Getting full path from short name

Thanks,

How do I call ZwQueryDirectoryFile? I will get reentrance issue in the
filter driver. Which is the best way to handle this situation - I know
that nav app causes bug check when using reentrance in filter driver?

Ronen

Ronen,
I think the only way that you can be sure to get the LFN is to
ask
the parent directory with ZwQueryDirectoryFile or some other method. A

shortcut to knowing if you have a LFN is to call
RtlIsNameLegalDOS8Dot3 with the name, and if the name is not a legal
8.3 name, then you know it is a LFN.

Matt

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of R
Sent: Monday, November 17, 2003 9:28 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Getting full path from short name

I am developing a file system filter driver for NT/2000/XP/2003
windows os. In the IRP_MJ_CREATE dispatch filter I sometimes get the
ms dos 8.3 file version such as - progra~1 and so. I need to get the
full name of that 8.3 file format - how can I do that? I need to find
the follwing:

  1. What is the best way to no if the file name I get is the short or
    the
    full name?
  2. If I get the 8.3 file format how can I find the full file name?

Again I need this to work on all 4 os.

Thanks,
Ronen


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


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

Is RtlIsNameLegalDOS8Dot3 work for directory also?

Thanks
Ramaraj

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Matthew N. White
Sent: Monday, November 17, 2003 6:55 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] RE: Getting full path from short name

Ronen,
I think the only way that you can be sure to get the LFN is to
ask the parent directory with ZwQueryDirectoryFile or some other method.
A shortcut to knowing if you have a LFN is to call
RtlIsNameLegalDOS8Dot3 with the name, and if the name is not a legal 8.3
name, then you know it is a LFN.

Matt

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of R
Sent: Monday, November 17, 2003 9:28 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Getting full path from short name

I am developing a file system filter driver for NT/2000/XP/2003 windows
os. In the IRP_MJ_CREATE dispatch filter I sometimes get the ms dos 8.3
file version such as - progra~1 and so. I need to get the full name of
that 8.3 file format - how can I do that? I need to find the follwing:

  1. What is the best way to no if the file name I get is the short or the
    full name?
  2. If I get the 8.3 file format how can I find the full file name?

Again I need this to work on all 4 os.

Thanks,
Ronen


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


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

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