IVssComponentEx::SetPrepareForBackupFailureMsg method (vswriter.h)

Sets a PrepareForBackup failure message string for a component.

This method can only be called by a writer's CVssWriter::OnPrepareBackup method.

Syntax

HRESULT SetPrepareForBackupFailureMsg(
  [in] LPCWSTR wszFailureMsg
);

Parameters

[in] wszFailureMsg

The address of a caller-allocated NULL-terminated wide character string containing the failure message that describes an error that occurred while processing a PrepareForBackup event.

Return value

The following are the valid return codes for this method.

Value Meaning
S_OK
The failure message was successfully set.
E_INVALIDARG
One of the parameter values is not valid.
E_OUTOFMEMORY
The caller is out of memory or other system resources.
VSS_E_BAD_STATE
This method was not called by a writer's CVssWriter::OnPrepareBackup method.

Remarks

The failure message that is set by SetPrepareForBackupFailureMsg applies to all files in the component and any subcomponents.

Requirements

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

See also

CVssWriter::OnPrepareBackup

IVssComponentEx

IVssComponentEx::GetPrepareForBackupFailureMsg