IVssBackupComponents::SetBackupOptions method (vsbackup.h)
The SetBackupOptions method sets a string of private, or writer-dependent, backup parameters for a component.
HRESULT SetBackupOptions( [in] VSS_ID writerId, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR wszLogicalPath, [in] LPCWSTR wszComponentName, [in] LPCWSTR wszBackupOptions );
Type of the component. See VSS_COMPONENT_TYPE for the possible values.
Null-terminated wide character string containing the logical path of the component.
For more information, see Logical Pathing of Components.
The value of the string containing the logical path used here should be the same as was used when the component was added to the backup set using IVssBackupComponents::AddComponent.
The logical path can be NULL.
There are no restrictions on the characters that can appear in a non-NULL logical path.
Null-terminated wide character string containing the name of the component.
The string containing the name cannot be NULL and should contain the same component name as was used when the component was added to the backup set using IVssBackupComponents::AddComponent.
Null-terminated wide character string containing the backup parameters to be set.
The following are the valid return codes for this method.
||Successfully set the backup options.|
||One of the parameter values is not valid.|
||The caller is out of memory or other system resources.|
||The backup components object is not initialized, this method has been called during a restore operation, or this method has not been called within the correct sequence.|
||The backup component does not exist.|
||The XML document is not valid. Check the event log for details. For more information, see Event and Error Handling Under VSS.|
Unexpected error. The error code is logged in the error log file. For more information, see
Event and Error Handling Under VSS.
Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported until Windows Server 2008 R2 and Windows 7. E_UNEXPECTED is used instead.
The exact syntax and content of the backup options set by the wszBackupOptions parameter of the SetBackupOptions method will depend on the specific writer being contacted.
This method must be called before IVssBackupComponents::PrepareForBackup.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||vsbackup.h (include VsBackup.h, Vss.h, VsWriter.h)|