3.1.1.4.2 QueryVolumesSupportedForSnapshots (Opnum 4)
The QueryVolumesSupportedForSnapshots method retrieves from the server a collection of volumes that support shadow copies.
-
HRESULT QueryVolumesSupportedForSnapshots( [in] VSS_ID ProviderId, [in] LONG lContext, [out] IVssEnumMgmtObject** ppEnum );
ProviderId: MUST be set to the shadow copy provider UUID as described in Standards Assignments (section 1.9).
lContext: MUST be set to the bitwise OR combination of the following VSS_VOLUME_SNAPSHOT_ATTRIBUTES flags.
-
Snapshot attribute mask for context value
VSS_VOLSNAP_ATTR_PERSISTENT
VSS_VOLSNAP_ATTR_CLIENT_ACCESSIBLE
VSS_VOLSNAP_ATTR_NO_AUTO_RELEASE
VSS_VOLSNAP_ATTR_NO_WRITERS
ppEnum: A pointer to an IVssEnumMgmtObject pointer that upon completion, contains a collection of volumes that support shadow copies. Each element in the collection MUST be a VSS_VOLUME_PROP structure. A caller MUST release the received ppEnum 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 ProviderId is GUID_NULL or when ppEnum is NULL.
0x80042304
VSS_E_PROVIDER_NOT_REGISTERED
Returned when the provider with ID ProviderId does not exist on the server.
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].
After receiving this message, the server MUST verify that ppEnum is not NULL.
The server MUST set the ppEnum pointer to an instance of the IVssEnumMgmtObject that contains a VSS_VOLUME_PROP structure for each volume on the server that is capable of supporting shadow copies. If the server has no volumes that support shadow copies, it MUST return an empty IVssEnumMgmtObject.