IVssComponentEx2::SetFailure method (vswriter.h)
VSS writers call this method to report errors at the component level.
Syntax
HRESULT SetFailure(
[in] HRESULT hr,
[in] HRESULT hrApplication,
[in] LPCWSTR wszApplicationMessage,
[in] DWORD dwReserved
);
Parameters
[in] hr
The error code to be returned to the requester that calls the IVssComponentEx2::GetFailure method.
The following are the error codes that this method can set.
Value | Meaning |
---|---|
|
The writer was successful. |
|
The shadow copy contains only a subset of the volumes needed by the writer to correctly back up the application component. |
|
The writer ran out of memory or other system resources. The recommended way to handle this error code is to wait ten minutes and then repeat the operation, up to three times. |
|
The writer operation failed because of a time-out between the Freeze and Thaw events. The recommended way to handle this error code is to wait ten minutes and then repeat the operation, up to three times. |
|
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 recommended way to handle this error code is to wait ten minutes and then repeat the operation, up to three times. |
|
The writer operation failed because of an error that might recur if another shadow copy is created. For more information, see Event and Error Handling Under VSS. |
[in] hrApplication
An additional error code to be returned to the requester. This parameter is optional.
[in] wszApplicationMessage
A string containing an error message for the requester to display to the end user. The writer is responsible for localizing this string if necessary before using it in this method. This parameter is optional and can be NULL or an empty string.
[in] dwReserved
This parameter is reserved for future use and should be set to zero.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
In addition to calling this method, use the CVssWriterEx2::SetWriterFailureEx method to report that a partial writer failure has occurred.
This method cannot be called from CVssWriter::OnIdentify or CVssWriterEx::OnIdentifyEx.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | vswriter.h |