3.4.5.2.39.3 IVdsVolumePlex::QueryExtents (Opnum 5)

The QueryExtents method returns all extents for the current plex.

 HRESULT QueryExtents(
   [out, size_is(,*plNumberOfExtents)] 
     VDS_DISK_EXTENT** ppExtentArray,
   [out] long* plNumberOfExtents
 );

ppExtentArray: A pointer to an array of VDS_DISK_EXTENT structures that, if the operation is successfully completed, receives the array of disk extent properties.

plNumberOfExtents: A pointer to a variable that, if the operation is successfully completed, receives the total number of elements in ppExtentArray.

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 ppExtentArray is not NULL.

  • Verify that plNumberOfExtents is not NULL.

The server MUST point ppExtentArray to an array of VDS_DISK_EXTENT structures that contain information about each disk extent on the volume plex, point plNumberOfExtents to the size of the array, and then return an HRESULT indicating failure or success.

For removable media drives, the server MUST set the value of diskId in the VDS_DISK_EXTENT structure to the VDS_OBJECT_ID of the drive associated with the plex object.

For a removable media drive with no media, the server MUST return a single extent of type VDS_DET_UNKNOWN with values of ullOffset and ullSize set to 0.