Export (0) Print
Expand All

IVdsVolumeMF::AddAccessPath method

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

Adds an access path.

Syntax


HRESULT AddAccessPath(
  [in]  LPWSTR pwszPath
);

Parameters

pwszPath [in]

A string indicating the access path, which is a user-mode path that can be used to open the volume. An access path can be a drive letter or a path to an empty directory on an NTFS volume. The access path string must include a trailing backslash, for example, "F:\".

Return value

This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, and VDS-specific return values. It can also return converted system error codes using the HRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlying VDS provider that is being used. Possible return values include the following.

Return code/valueDescription
S_OK

The path was added successfully.

S_FALSE

The access path was added successfully, however, an error occurred. VDS possibly failed to update the GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER attribute of a partition or failed to add a default network share (such as F$) while adding the drive letter. For more information, see PARTITION_INFORMATION_GPT.

VDS_E_OBJECT_STATUS_FAILED
0x80042431L

The volume failed.

VDS_E_PACK_OFFLINE
0x80042444L

The pack containing the volume is not accessible.

 

Remarks

VDS adds the access path by creating a mounted folder (also called a volume mount point). Note that mounted folders are supported only on NTFS volumes. For more information, see Mounted Folders.

This method returns ERROR_DIR_NOT_EMPTY if the pwszPath parameter contains a path to a mounted folder that is already in use (even if the directory is empty) or if pwszPath contains a path to a nonempty directory.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Vds.h

Library

Uuid.lib

See also

IVdsVolumeMF
SetVolumeMountPoint

 

 

Community Additions

ADD
Show:
© 2014 Microsoft