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

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