Export (0) Print
Expand All

IVssComponent::GetBackupMetadata method

The GetBackupMetadata method retrieves private, writer-specific backup metadata that might have been set during a PrepareForBackup event by CVssWriter::OnPrepareBackup using IVssComponent::SetBackupMetadata.

Only a writer can call this method.

Syntax


HRESULT GetBackupMetadata(
  [out]  BSTR *pbstrMetadata
);

Parameters

pbstrMetadata [out]

The address of a caller-allocated variable that receives a string containing the backup metadata that was added during an OnPrepareBackup event.

Return value

The following are the valid return codes for this method.

ValueMeaning
S_OK

Successfully returned the attribute value.

S_FALSE

There is no backup metadata associated with this component.

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.

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

If the call to GetBackupMetadata is successful, the caller is responsible for freeing the string that is returned in the pbstrMetadata parameter by calling the SysFreeString function.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

VsWriter.h (include Vss.h or VsWriter.h)

Library

VssApi.lib

See also

IVssComponent
IVssComponent::SetBackupMetadata

 

 

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft