3.4.5.2.4.7 IVdsService::QueryDriveLetters (Opnum 10)

The QueryDriveLetters method enumerates the drive letters of the server.

 HRESULT QueryDriveLetters(
   [in] WCHAR wcFirstLetter,
   [in] DWORD count,
   [out, size_is(count)] VDS_DRIVE_LETTER_PROP* pDriveLetterPropArray
 );

wcFirstLetter: The first drive letter to query as a single uppercase or lowercase alphabetical (A-Z) Unicode character.

count: The total number of drive letters to retrieve, beginning with the letter that wcFirstLetter specifies. This MUST also be the number of elements in the pDriveLetterPropArray. It MUST NOT exceed the total number of drive letters between the letter in wcFirstLetter and the last possible drive letter (Z), inclusive.

pDriveLetterPropArray: An array of VDS_DRIVE_LETTER_PROP structures that, if the operation is successfully completed, receives the array of drive letter properties.

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 wcFirstLetter is an uppercase or lowercase alphabetical character (A-Z) in Unicode format.

  • Verify that the count does not exceed the total number of drive letters between the letter in wcFirstLetter and the last possible drive letter (Z), inclusive.

  • Verify that pDriveLetterPropArray is not NULL.

The server MUST populate the VDS_DRIVE_LETTER_PROP structure that pDriveLetterPropArray references with information about each drive letter that is requested. The server MUST then return an HRESULT indicating failure or success.