Expand Minimize

IoQueryFileDosDeviceName routine

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

Syntax


NTSTATUS IoQueryFileDosDeviceName(
  _In_   PFILE_OBJECT FileObject,
  _Out_  POBJECT_NAME_INFORMATION *ObjectNameInformation
);

Parameters

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.

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

Version

This routine is available starting withWindows XP.

Header

Ntifs.h (include Ntifs.h or Fltkernel.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

See also

UNICODE_STRING

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft