IVssComponent::GetPreRestoreFailureMsg method (vswriter.h)
The GetPreRestoreFailureMsg method retrieves the error message generated by a writer while handling the PreRestore event, if IVssComponent::SetPreRestoreFailureMsg set one.
Either a writer or a requester can call this method.
Syntax
HRESULT GetPreRestoreFailureMsg(
[out] BSTR *pbstrPreRestoreFailureMsg
);
Parameters
[out] pbstrPreRestoreFailureMsg
String containing the failure message that describes an error that occurred while processing the PreRestore event.
Return value
The following are the valid return codes for this method.
Value | Meaning |
---|---|
|
Successfully returned the attribute value. |
|
No PreRestore failure message was available to retrieve. |
|
One of the parameter values is not valid. |
|
The caller is out of memory or other system resources. |
|
The XML document is not valid. Check the event log for details. For more information, see Event and Error Handling Under VSS. |
Remarks
The caller should free the memory held by the pbstrPreRestoreFailureMsg parameter by calling SysFreeString.
If SetPreRestoreFailureMsg was not used to set a PreRestore failure message, GetPreRestoreFailureMsg returns S_FALSE.
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::GetPostRestoreFailureMsg