FILE_NAME_INFORMATION - NtDoc

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

/**
 * The FILE_NAME_INFORMATION structure is used to query or set the file name and/or new short name for a file.
 * \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-_file_name_information
 */
typedef struct _FILE_NAME_INFORMATION
{
    ULONG FileNameLength;
    _Field_size_bytes_(FileNameLength) WCHAR FileName[1];
} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;

#endif

View code on GitHub
// ntddk.h

typedef struct _FILE_NAME_INFORMATION {
  ULONG FileNameLength;
  WCHAR FileName[1];
} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-ntddk-_file_name_information)

_FILE_NAME_INFORMATION structure

Description

The FILE_NAME_INFORMATION structure is used as argument to the ZwQueryInformationFile and ZwSetInformationFile routines.

Members

FileNameLength

Specifies the length, in bytes, 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

The ZwQueryInformationFile routine uses this structure to return the file name string to the caller. For more information about the form of the name returned, see ZwQueryInformationFile.

Callers of ZwSetInformationFile can use this structure to specify a new short name for a file.

See also

ZwQueryInformationFile

ZwSetInformationFile


NTinternals.net (undocumented.ntinternals.net)

This structure is documented in Windows Driver Kit.


Structure FILE_NAME_INFORMATION contains name of queried file object. It's used as a result of call NtQueryInformationFile with FileNameInformation or FileAlternateNameInformation information class.

FileNameLength

Length of FileName, in bytes.

FileName[1]

UNICODE name of file. If caller query about FileNameInformation, FileName additionally contains path to file, and begins with '/' (full path to file relative to device).

Documented by

See also