IoQueryFileDosDeviceName function

The IoQueryFileDosDeviceName routine retrieves an MS-DOS device name for a file.

Syntax

NTSTATUS IoQueryFileDosDeviceName(
  PFILE_OBJECT             FileObject,
  POBJECT_NAME_INFORMATION *ObjectNameInformation
);

Parameters

FileObject

Pointer to a file object for the file.

ObjectNameInformation

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.
 

Return value

IoQueryFileDosDeviceName returns STATUS_SUCCESS or an error NTSTATUS value, such as STATUS_INSUFFICIENT_RESOURCES.

Remarks

For more information about MS-DOS names, see the Files and I/O section of the Platform Software Development Kit (SDK) documentation.

Requirements

   
Minimum supported client This routine is available starting withWindows XP.
Target Platform Universal
Header ntifs.h (include Ntifs.h, Fltkernel.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See also

UNICODE_STRING