IVssComponent::SetBackupMetadata method (vswriter.h)

The SetBackupMetadata method sets backup metadata with the component.

A writer can call this method only during a backup operation.

This method cannot be called while handling a BackupComplete (CVssWriter::OnBackupComplete) or BackupShutdown (CVssWriter::OnBackupShutdown) event.

Syntax

HRESULT SetBackupMetadata(
  [in] LPCWSTR wszData
);

Parameters

[in] wszData

A NULL-terminated wide character string that contains the backup metadata.

Return value

The following are the valid return codes for this method.

Value Meaning
S_OK
Successfully set the item.
E_INVALIDARG
One of the parameter values is not valid.
E_OUTOFMEMORY
The caller is out of memory or other system resources.
VSS_E_OBJECT_ALREADY_EXISTS
Private metadata has already been written for this component.
VSS_E_BAD_STATE
This method was not called by a writer or, if called by a writer, it either was not called during a backup operation or was called while handling a BackupComplete or BackupShutdown event.

Remarks

SetBackupMetadata sets private, writer-specific metadata describing a backup operation.

The format need not conform to any VSS metadata specification.

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

IVssComponent::GetBackupMetadata

IVssComponent::SetRestoreMetadata