RE: How to query for a long filename using IRP_MJ_DIRECTO RY_CONTROL/IRP_MN_QUERY_DIRECTORY?

(1) Yes. Explorer uses this technique all of the time to match up long
name/short name as well as actual case of the file name.
(2) Not in the versions you are targeting.
(3) This can either be a file name you wish to find (not a path, just a
filename) or a regular expression (e.g., “*.doc” to find all of the DOC
files within the directory.) That name will be used to match the short OR
long file name.
(4) No. IRP_MJ_DIRECTORY_CONTROL is one of the functions managed by the
Flags field in the DEVICE_OBJECT. For most file systems this will be
neither I/O, so the data will be returned in the buffer pointed to by
Irp->Userbuffer.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: vishnu [mailto:xxxxx@lycos.com]
Sent: Tuesday, November 19, 2002 8:15 AM
To: File Systems Developers
Subject: [ntfsd] How to query for a long filename using
IRP_MJ_DIRECTORY_CONTROL/IRP_MN_QUERY_DIRECTORY?

I am writing a filter driver over NTFS for WIN NT 4.0 & win2K .I get a
short filename to the delete routine of the filter driver when the file is
deleted from the command prompt using del command.(Eg.
h:\testdir\longfilename.txt will be sent as h:\testdir\longfi~1.txt).
Suppose I want to query for the long filename by creating my own IRP and
filling in the QuerDirectory structure. I have the following queries.

  1. Is it possible to always get a long filename using
    IRP_MJ_DIRECTORY_CONTROL and filling in the appropriate IRP parameters?
  2. Is it possible to obtain long filename for a particular file directly
    i.e not querying the entire directory?
  3. what do I fill up in the “FileName”(a filename in particular for which
    I want the long name or the parent directory-Eg. In the above
    case,h:\testdir ? ) and “FileIndex”(I don’t know for what reason this
    field is used for) fields in the QueryDirectory structure?
  4. will AssociatedIrp.SystemBuffer always get the results of the query?

TIA,
Vishnu


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