Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FILE_NAMES_INFORMATION structure

A FILE_NAMES_INFORMATION structure used to query detailed information about the names of files in a directory.

Syntax


typedef struct _FILE_NAMES_INFORMATION {
  ULONG NextEntryOffset;
  ULONG FileIndex;
  ULONG FileNameLength;
  WCHAR FileName[1];
} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;

Members

NextEntryOffset

Byte offset for the next FILE_NAMES_INFORMATION entry, if multiple entries are present in a buffer. This member is zero if no other entries follow this one.

FileIndex

Byte offset of the file within the parent directory. This member is undefined for file systems, such as NTFS, in which the position of a file within the parent directory is not fixed and can be changed at any time to maintain sort order.

FileNameLength

Specifies the length of the file name string.

FileName

Specifies the first character of the file name string. This is followed in memory by the remainder of the string.

Remarks

This information can be queried in either of the following ways:

  • Call ZwQueryDirectoryFile, passing FileNamesInformation as the value of FileInformationClass and passing a caller-allocated, FILE_NAMES_INFORMATION-structured buffer as the value of FileInformation.

  • Create an IRP with major function code IRP_MJ_DIRECTORY_CONTROL and minor function code IRP_MN_QUERY_DIRECTORY.

No specific access rights are required to query this information.

This structure must be aligned on a LONG (4-byte) boundary. If a buffer contains two or more of these structures, the NextEntryOffset value in each entry, except the last, falls on a 4-byte boundary.

Requirements

Header

Ntifs.h (include Ntifs.h or Fltkernel.h)

See also

FsRtlNotifyFullChangeDirectory
IRP_MJ_DIRECTORY_CONTROL
ZwQueryDirectoryFile

 

 

Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.