IVssSoftwareSnapshotProvider::Query method (vsprov.h)

Queries the provider for information about the shadow copies that the provider has completed.

Syntax

HRESULT Query(
  [in]  VSS_ID          QueriedObjectId,
  [in]  VSS_OBJECT_TYPE eQueriedObjectType,
  [in]  VSS_OBJECT_TYPE eReturnedObjectsType,
  [out] IVssEnumObject  **ppEnum
);

Parameters

[in] QueriedObjectId

Reserved for system use. The value of this parameter must be GUID_NULL.

[in] eQueriedObjectType

Reserved for system use. The value of this parameter must be VSS_OBJECT_NONE.

[in] eReturnedObjectsType

Reserved for system use. The value of this parameter must be VSS_OBJECT_SNAPSHOT.

[out] ppEnum

The address of an IVssEnumObject interface pointer, which is initialized on return. Callers must release the interface. This parameter is required and cannot be null.

Return value

The following are the valid return codes for this method.

Value Meaning
S_OK
The query operation was successful.
E_ACCESSDENIED
The caller does not have sufficient backup privileges or is not an administrator.
E_INVALIDARG
One of the parameter values is not valid.
E_OUTOFMEMORY
The caller is out of memory or other system resources.
VSS_E_PROVIDER_VETO
Provider error. The provider logged the error in the event log. For more information, see Event and Error Handling Under VSS.

Remarks

Calling the IVssEnumObject::Next method on the IVssEnumObject interface that is returned though the ppEnum parameter will return VSS_OBJECT_PROP structures containing a VSS_SNAPSHOT_PROP structure for each shadow copy.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header vsprov.h
Library VssApi.lib

See also

IVssSoftwareSnapshotProvider