Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

An application opened the file using the short name. How do I retrieve the long name?

application file opened short
0
10 Posted

An application opened the file using the short name. How do I retrieve the long name?

0
10

The one mechanism that works on all versions of Windows NT, 2000, and XP is to look into the directory that contains the entry. In Windows XP, this can be done using NtQueryDirectoryFile, which is part of the Windows XP IFS Kit. However, in earlier versions this call is not exposed by the IFS Kit and thus it requires that a filter driver implement equivalent functionality by using the IRP_MN_QUERY_DIRECTORY operations. Using NtQueryDirectoryFile, the filter driver can specify a search of the directory using the short file name. The FSD will then return one (or more) file that has a matching short file name as well as its corresponding long file name. For the standard file systems, this would only return a single matching entry. From this, both the short name and long name of the file can be retrieved.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123