// ntifs.h
NTSTATUS IoQueryFileDosDeviceName(
[in] PFILE_OBJECT FileObject,
[out] POBJECT_NAME_INFORMATION *ObjectNameInformation
);
View the official Windows Driver Kit DDI referenceNo description available.
The IoQueryFileDosDeviceName routine retrieves an MS-DOS device name for a file.
FileObject [in]Pointer to a file object for the file.
ObjectNameInformation [out]A returned pointer to a newly allocated OBJECT_NAME_INFORMATION structure. This structure is filled in on successful return with the MS-DOS device name information. The structure is defined as follows:
typedef struct _OBJECT_NAME_INFORMATION {
UNICODE_STRING Name;
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
Note This structure must eventually be freed by calling ExFreePool.
IoQueryFileDosDeviceName returns STATUS_SUCCESS or an error NTSTATUS value, such as STATUS_INSUFFICIENT_RESOURCES.
For more information about MS-DOS names, see the Files and I/O section of the Platform Software Development Kit (SDK) documentation.