CVssWriter::SetWriterFailure method (vswriter.h)

The SetWriterFailure method indicates that this writer has encountered an error condition and sets an error condition.

SetWriterFailure is a protected method implemented by the CVssWriter base class.


HRESULT SetWriterFailure(
  [in] HRESULT hr


[in] hr

Error code to be set. The following are the error codes that this method can set.

Value Meaning
The shadow copy contains only a subset of the volumes needed to correctly back up an application component.
The writer failed due to an error that would likely occur if another shadow copy is created.
The writer failed due to a resource allocation error.
The writer failed due to an error that would likely not occur if the entire backup, restore, or shadow copy creation process was restarted.
The writer could not complete the shadow copy creation because the time between freeze and thaw states exceeded the time-out value (dwTimeoutFreeze) set in CVssWriter::Initialize.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


This method cannot be called from CVssWriter::OnIdentify or CVssWriterEx::OnIdentifyEx.

If a writer's event handler (such as CVssWriter::OnFreeze) calls this method, it must do so in the same thread that called the event handler. For more information, see Writer Event Handling.


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