Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AddAccessPath method of the MSFT_Partition class

Adds a mount path or drive letter assignment to the partition.

Syntax


UInt32 AddAccessPath(
  [in]   String AccessPath,
  [in]   Boolean AssignDriveLetter,
  [out]  String ExtendedStatus
);

Parameters

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.

Return value

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)

Remarks

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.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Namespace

\\.\Root\Microsoft\Windows\Storage

MOF

Storagewmi.mof

See also

MSFT_Partition

 

 

Community Additions

Show:
© 2014 Microsoft