3.4.5.2.24.8 IVdsAdvancedDisk::GetDriveLetter (Opnum 10)

The GetDriveLetter method retrieves the drive letter of an OEM, ESP, or unknown partition on the disk at a specified byte offset.

 HRESULT GetDriveLetter(
   [in] ULONGLONG ullOffset,
   [out] WCHAR* pwcLetter
 );

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.

pwcLetter: A pointer to a Unicode character that will receive an uppercase or lowercase alphabetical (A-Z) drive letter for the partition at byte offset ullOffset.

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.

ERROR_SUCCESS (0x00000000)

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

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

  • Verify that the partition has a drive letter.

  • Verify that the partition is an OEM, ESP, or unknown partition.

  • Verify that pwcLetter is not NULL.

The server MUST set a value referenced by pwcLetter with the drive letter of the partition and return an HRESULT indicating failure or success.