3.1.4.4.5 QueryDiffAreasForVolume (Opnum 6)

The QueryDiffAreasForVolume method retrieves from the server the collection of shadow copy storage associations that are being used for shadow copy storage for a specified original volume.

 HRESULT QueryDiffAreasForVolume(
   [in] VSS_PWSZ pwszVolumeName,
   [out] IVssEnumMgmtObject** ppEnum
 );

pwszVolumeName: A null-terminated UNICODE string that contains the drive letter, mount point, or volume mount name of the original volume for which the existing shadow copy association collection is requested.

ppEnum: A pointer to an IVssEnumMgmtObject pointer that upon completion, contains a collection of shadow copy storage associations that are providing shadow copy storage for the specified original volume. Each element in the collection MUST be a VSS_DIFF_AREA_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 pwszVolumeName 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 pwszVolumeName 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_AREA_PROP structure for each shadow copy storage association for the specified original volume on the server. If there are no shadow copy storage associations that match the criteria, the server MUST return an empty IVssEnumMgmtObject object.

All the shadow copy storage association objects that are returned in the collection MUST contain VSS_DIFF_AREA_PROP structures where the m_pwszVolumeName member matches pwszVolumeName.