IVssComponent::GetRestoreMetadata method (vswriter.h)

The GetRestoreMetadata method retrieves private, writer-specific restore metadata that might have been set during a PreRestore event by CVssWriter::OnPreRestore using IVssComponent::SetRestoreMetadata.

Only a writer can call this method.

Syntax

HRESULT GetRestoreMetadata(
  [out] BSTR *pbstrRestoreMetadata
);

Parameters

[out] pbstrRestoreMetadata

A string containing the restore metadata.

Return value

The following are the valid return codes for this method.

Value Meaning
S_OK
Successfully returned the attribute value.
S_FALSE
The specified attribute does not have a value.
E_INVALIDARG
One of the parameter values is not valid.
E_OUTOFMEMORY
The caller is out of memory or other system resources.
VSS_E_INVALID_XML_DOCUMENT
The XML document is not valid. Check the event log for details. For more information, see Event and Error Handling Under VSS.

Remarks

This method can be called at any time depending on the logic of a given writer.

The caller should free the memory held by the pbstrRestoreMetadata parameter by calling SysFreeString.

If no backup metadata has been set, GetBackupMetadata returns S_FALSE.

A writer setting the restore method to VSS_RME_RESTORE_TO_ALTERNATE_LOCATION without defining an alternate location mapping constitutes a writer error.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header vswriter.h (include Vss.h, VsWriter.h)
Library VssApi.lib

See also

IVssComponent