3.1.4.4.6 QueryDiffAreasOnVolume (Opnum 7)

The QueryDiffAreasOnVolume method retrieves from the server the collection of shadow copy storage associations that are located on a specified volume.

 HRESULT QueryDiffAreasOnVolume(
   [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 shadow copy storage volume on 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 located on the specified 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 that is located on the specified volume. If no shadow copy storage associations 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_pwszDiffAreaVolumeName member matches pwszVolumeName.