3.2.4.4.1.62 IVolumeClient::EnumAccessPathForVolume (Opnum 79)

The EnumAccessPathForVolume method enumerates the mount points of a specified volume, partition, or logical drive.

 HRESULT EnumAccessPathForVolume(
   [in] LdmObjectId VolumeId,
   [in, out] int* lCount,
   [out, size_is(,*lCount)] COUNTED_STRING** paths
 );

volumeId: Specifies the OID of the volume, partition, or logical drive for which to enumerate mount points.

lCount: The address of an int that returns the number of elements returned in paths.

paths: Pointer to an array of COUNTED_STRING structures that describe all mount points configured on the machine.

Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific nonzero error code on failure (as specified in [MS-ERREF]; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).

Upon receiving this message, the server MUST validate parameters:

  1. Verify that the volume, partition, or logical drive specified by volumeId is in the list of storage objects.

  2. Verify that lCount and paths are not NULL.

If parameter validation fails, the server MUST fail the operation immediately, returning an appropriate error as its response to the client.

Otherwise, the server MUST compose a response to the client as follows:

  1. Enumerate all mount points of the volume, partition, or logical drive specified by volumeId.

  2. Allocate a buffer large enough to contain COUNTED_STRING structures describing all enumerated mount points.

  3. Populate each COUNTED_STRING structure in the buffer with the mount point path.

  4. The buffer MUST be returned to the client in the output parameter paths.

  5. The number of COUNTED_STRING structures in the buffer MUST be returned in the output parameter lCount.

  6. Return a response that contains the output parameters mentioned previously and the status of the operation.

The server MUST NOT change the list of storage objects as part of processing this message.