3.1.4.4.4 QueryVolumesSupportedForDiffAreas (Opnum 5)

The QueryVolumesSupportedForDiffAreas method retrieves from the server the collection of volumes that can be used as a shadow copy storage volume for a specified original volume.

 HRESULT QueryVolumesSupportedForDiffAreas(
   [in] VSS_PWSZ pwszOriginalVolumeName,
   [out] IVssEnumMgmtObject** ppEnum
 );

pwszOriginalVolumeName: A null-terminated UNICODE string that contains the drive letter, mount point, or volume mount name of the original volume.

ppEnum: A pointer to an IVssEnumMgmtObject pointer that upon completion, contains a collection of volumes that can be used to create shadow copy storage associations with the specified original volume. Each element in the collection MUST be a VSS_DIFF_VOLUME_PROP structure. A caller MUST release the ppEnum received when the caller is done with it.

Return Values: The method MUST return zero when it has succeeded or an implementation-specific nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

Returned when pwszOriginalVolumeName or ppEnum is NULL.

0x80070005

E_ACCESSDENIED

Returned when the user making the request does not have sufficient privileges to perform the operation.

No exceptions are thrown except those that are thrown by the underlying RPC protocol [MS-RPCE].

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

  • The pwszOriginalVolumeName parameter is not NULL.

  • The ppEnum parameter is not NULL.

The server MUST set the ppEnum pointer to an instance of IVssEnumMgmtObject that contains a VSS_DIFF_VOLUME_PROP structure for each volume that can provide shadow copy storage for the specified original volume. If the server contains no volumes that can provide shadow copy storage for the specified volume, the server MUST return an empty IVssEnumMgmtObject object.