FILE_NAMES_INFORMATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTIOAPI_H

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

#endif

View code on GitHub
// ntifs.h

typedef struct _FILE_NAMES_INFORMATION {
  ULONG NextEntryOffset;
  ULONG FileIndex;
  ULONG FileNameLength;
  WCHAR FileName[1];
} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-ntifs-_file_names_information)

FILE_NAMES_INFORMATION structure

Description

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

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

Length of the file name string.

FileName

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:

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.

See also

FsRtlNotifyFullChangeDirectory

IRP_MJ_DIRECTORY_CONTROL

ZwQueryDirectoryFile


NTinternals.net (undocumented.ntinternals.net)

This structure is documented in Windows Driver Kit.


Structure FILE_NAMES_INFORMATION is used as a result of call NtQueryDirectoryFile with FileNamesInformation information class. It's shorter then other directory informational structures, so can be used for better performance, when only file names are required.

NextEntryOffset

Offset (in bytes) of next FILE_NAMES_INFORMATION entry, or zero if last.

FileIndex

Index of file, or zero if Directory Indexing is disabled.

FileNameLength

Length of FileName array, in bytes.

FileName[1]

Name of file, in UNICODE format.

Documented by

See also