3.4.5.2.24.6 IVdsAdvancedDisk::AssignDriveLetter (Opnum 8)

The AssignDriveLetter method assigns a drive letter to an existing OEM, ESP, or unknown partition.

 HRESULT AssignDriveLetter(
   [in] ULONGLONG ullOffset,
   [in] WCHAR wcLetter
 );

ullOffset: The byte offset of the partition, from the beginning of the disk. This offset MUST be the offset of a start of a partition.

wcLetter: The drive letter to assign, as a single uppercase or lowercase alphabetical (A-Z) Unicode character.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success, or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.

When the server receives this message, it MUST validate the following parameters:

  • Verify that the partition at the byte offset specified by ullOffset does not have a volume existing on it.

  • Verify that the drive letter specified by wcLetter is not already used.

The server MUST assign the drive letter to the partition and return an HRESULT indicating failure or success.