3.2.4.4.1.63 IVolumeClient::AddAccessPath (Opnum 80)

The AddAccessPath method adds the specified mount point to a volume, a partition, or a logical drive.

 HRESULT AddAccessPath(
   [in] int cch_path,
   [in, size_is(cch_path)] WCHAR* path,
   [in] LdmObjectId targetId
 );

cch_path: Length of path in characters, including the terminating null character.

path: Null-terminated mount point path to assign to the volume targeted (see mounted folder). This is Unicode.

targetId: Specifies the OID of the volume, partition, or logical drive to which the new mount point is to be assigned.

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 targetId is in the list of storage objects.

  2. Verify that path is 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 process the message as follows:

  1. Assign the mount point specified by path to the volume, partition, or logical drive specified by targetId.

  2. Wait for the operation to succeed or fail.

  3. Return a response to the client that contains the status of the operation.