IOCTL_MOUNTMGR_QUERY_POINTS control code

This IOCTL returns triples that consist of a persistent symbolic link name for the volume (that is, a mount point), a unique ID for the volume, and a nonpersistent device name (such as "\Device\HarddiskVolume1") for the volume. The input to this IOCTL is a MOUNTMGR_MOUNT_POINT structure that contains a single triple.

If the input triple contains a unique ID or a non-persistent device name, the request retrieves all associated mount points (symbolic links), including the volume GUID pathname and the drive letters. However, if the input triple has a symbolic link, but does not specify either the unique ID or the device name, the request only returns a single triple that contains the symbolic link that was provided in the input, together with the unique ID and the device name. The caller must submit another IOCTL with either the unique ID or the device name to retrieve the remaining mount points.

If the input triple is empty, the mount manager returns the entire mounted device list.

The mount manager returns triples that match as much info as is provided by the caller. If the caller submits the unique ID, the mount manager returns all triples with that unique ID. If the caller inputs the volume pathname or a drive letter as the symbolic link name, the mount manager returns only the triple for the symbolic link. There is one entry per symbolic link. If the caller inputs a device pathname, the mount manager returns only the triples for that device pathname. If the caller inputs a unique ID and a symbolic link, again, the mount manager returns only one entry for that symbolic link. A caller would do this to get the device pathname. If the caller inputs no device pathname, unique ID or symbolic link, the mount manager returns all entries/triples.

Input Parameters

Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the input buffer, which must be greater than or equal to sizeof(MOUNTMGR_MOUNT_POINT).

The mount manager client initializes the MOUNTMGR_MOUNT_POINT structure, defined in Mountmgr.h, at the beginning of the buffer at Irp->AssociatedIrp.SystemBuffer. Immediately following this structure, the MM client loads the symbolic link name, the unique ID and the device name, in that order.

Output Parameters

The mount manager initializes a variable-length structure of type MOUNTMGR_MOUNT_POINTS, defined in Mountmgr.h, at the beginning of the buffer at Irp->AssociatedIrp.SystemBuffer. The mount manager inserts the mount points, associated with the indicated volume, at the address pointed to by the MountPoints[] member of this structure. Each mount point is represented by a MOUNTMGR_MOUNT_POINT structure as defined in the Input section for this IOCTL.

I/O Status Block

If the operation is successful, the Status field is set to STATUS_SUCCESS.

If neither the unique ID nor the nonpersistent device name are found in the volumes mounted device list, the Status field is set to STATUS_INVALID_PARAMETER.

If InputBufferLength is less than sizeof(MOUNTMGR_MOUNT_POINT), the Status field is set to STATUS_INVALID_PARAMETER.

If InputBufferLength is less than the total length of the three input ID strings, the Status field is set to STATUS_INVALID_PARAMETER.

If OutputBufferLength is less than sizeof(MOUNTMGR_MOUNT_POINT), the Status field is set to STATUS_INVALID_PARAMETER.

If OutputBufferLength is less than sizeof(MOUNTMGR_MOUNT_POINTS) plus the sum of the sizes of the mount point triples, the Status field is set to STATUS_BUFFER_OVERFLOW.

If any of the three strings contained within any of the triples is aligned on an odd address (for example, address & 01 != 0), the Status field is set to STATUS_INVALID_PARAMETER.

Requirements

Header

Mountmgr.h (include Mountmgr.h)

See also

MOUNTMGR_MOUNT_POINTS

 

 

Send comments about this topic to Microsoft

Show: