AddAccessPath method of the MSFT_Partition class
Adds a mount path or drive letter assignment to the partition.
UInt32 AddAccessPath( [in] String AccessPath, [in] Boolean AssignDriveLetter, [out] String ExtendedStatus );
- AccessPath [in]
Specifies the access path, which is a user-mode path that can be used to open the partition. An access path can be a drive letter (for example, "C:" or "C:\") or a path to an empty directory on an NTFS volume. The access path string does not require a trailing backslash.
- AssignDriveLetter [in]
If TRUE, the next available drive letter will be assigned to the partition.
- ExtendedStatus [out]
A string that contains an embedded MSFT_StorageExtendedStatus object.
This parameter allows the storage provider to return extended (implementation-specific) error information.
- Success (0)
- Not Supported (1)
- Unspecified Error (2)
- Timeout (3)
- Failed (4)
- Invalid Parameter (5)
- Access denied (40001)
- There are not enough resources to complete the operation. (40002)
- The requested access path is already in use. (42002)
- Cannot assign access paths to hidden partitions. (42004)
- The access path is not valid. (42007)
This method adds a mount path or drive letter assignment to the partition. The AccessPath and AssignDriveLetter parameters are mutually exclusive, and will result in an Invalid Parameter error if both are specified at once. This method adds the access path by creating a mounted folder (also called a volume mount point). Note that mounted folders are supported only on NTFS formatted partitions. This method returns an error if the path specified in AccessPath is a folder that is already in use (even if the directory is empty) or if it contains a path to a non-empty directory.
Minimum supported client
|Windows 8 [desktop apps only]|
Minimum supported server
|Windows Server 2012 [desktop apps only]|
Build date: 10/26/2012