Expand Minimize

IoVolumeDeviceToDosName routine

The IoVolumeDeviceToDosName routine returns the MS-DOS path for a specified device object that represents a file system volume.

Syntax


NTSTATUS IoVolumeDeviceToDosName(
  _In_   PVOID VolumeDeviceObject,
  _Out_  PUNICODE_STRING DosName
);

Parameters

VolumeDeviceObject [in]

A pointer to a device object that represents a volume device object created by a storage class driver.

DosName [out]

A pointer to a caller-allocated UNICODE_STRING structure. If the call is successful, IoVolumeDeviceToDosName sets the values of the Length, MaximumLength, and Buffer members of this structure. On exit, the Buffer member points to a wide-character, null-terminated string that contains the MS-DOS path of the volume device object specified by VolumeDeviceObject. For more information, see Remarks.

Return value

IoVolumeDeviceToDosName returns STATUS_SUCCESS if the call is successful. Possible error return values include the following status codes.

Return valueDescription
STATUS_INVALID_PARAMETER

The routine failed due to invalid parameter values passed by the caller.

STATUS_INSUFFICIENT_RESOURCES

The routine failed to allocate resources required for this operation.

 

Remarks

IoVolumeDeviceToDosName allocates the string buffer pointed to by the Buffer member of the UNICODE_STRING structure that the DosName parameter points to. After this buffer is no longer required, a caller of this routine should call the ExFreePool routine to free the buffer.

Starting with Windows Vista, you must ensure that APCs are not disabled before calling this routine. The KeAreAllApcsDisabled routine can be used to verify that APCs are not disabled.

Requirements

Version

Available starting with Windows XP. Drivers that must work in earlier versions of Windows NT-based operating systems can use RtlVolumeDeviceToDosName, which behaves identically.

Header

Ntddk.h (include Ntddk.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

See also

ExFreePool
KeAreAllApcsDisabled
UNICODE_STRING

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft