Skip to content

Latest commit

 

History

History
244 lines (188 loc) · 7.94 KB

nf-vsbackup-ivssbackupcomponents-addrestoresubcomponent.md

File metadata and controls

244 lines (188 loc) · 7.94 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:vsbackup.IVssBackupComponents.AddRestoreSubcomponent
IVssBackupComponents::AddRestoreSubcomponent (vsbackup.h)
Indicates that a subcomponent member of a component set, which had been marked as nonselectable for backup but is marked selectable for restore, is to be restored.
AddRestoreSubcomponent
AddRestoreSubcomponent method [VSS]
AddRestoreSubcomponent method [VSS]
IVssBackupComponents interface
IVssBackupComponents interface [VSS]
AddRestoreSubcomponent method
IVssBackupComponents.AddRestoreSubcomponent
IVssBackupComponents::AddRestoreSubcomponent
_win32_ivssbackupcomponents_addrestoresubcomponent
base.ivssbackupcomponents_addrestoresubcomponent
vsbackup/IVssBackupComponents::AddRestoreSubcomponent
base\ivssbackupcomponents_addrestoresubcomponent.htm
base
8eea27d7-6780-49cf-97ea-8876a9a2c8f8
12/05/2018
AddRestoreSubcomponent, AddRestoreSubcomponent method [VSS], AddRestoreSubcomponent method [VSS],IVssBackupComponents interface, IVssBackupComponents interface [VSS],AddRestoreSubcomponent method, IVssBackupComponents.AddRestoreSubcomponent, IVssBackupComponents::AddRestoreSubcomponent, _win32_ivssbackupcomponents_addrestoresubcomponent, base.ivssbackupcomponents_addrestoresubcomponent, vsbackup/IVssBackupComponents::AddRestoreSubcomponent
vsbackup.h
VsBackup.h, Vss.h, VsWriter.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
VssApi.lib
Windows
19H1
IVssBackupComponents::AddRestoreSubcomponent
vsbackup/IVssBackupComponents::AddRestoreSubcomponent
c++
APIRef
kbSyntax
COM
VssApi.lib
VssApi.dll
IVssBackupComponents.AddRestoreSubcomponent

IVssBackupComponents::AddRestoreSubcomponent

-description

The AddRestoreSubcomponent method indicates that a subcomponent member of a component set, which had been marked as nonselectable for backup but is marked selectable for restore, is to be restored irrespective of whether any other member of the component set will be restored.

-parameters

-param writerId [in]

Writer class identifier.

-param componentType [in]

Identifies the type of the component. Refer to the documentation for VSS_COMPONENT_TYPE for possible return values.

-param wszLogicalPath [in]

Null-terminated wide character string containing the logical path of the component in the backup document that defines the backup component set containing the subcomponent to be added for restore.

The value of this parameter can be NULL.

There are no restrictions on the characters that can appear in a non-NULL logical path.

-param wszComponentName [in]

Null-terminated wide character string containing the logical path of the component in the backup document that defines the backup component set containing the subcomponent to be added for restore.

The value of this parameter cannot be NULL.

There are no restrictions on the characters that can appear in a non-NULL component name.

-param wszSubComponentLogicalPath [in]

Null-terminated wide character string containing the logical path of the subcomponent to be added for restore.

A logical path is required when adding a subcomponent. Therefore, the value of this parameter cannot be NULL.

There are no restrictions on the characters that can appear in a non-NULL logical path.

-param wszSubComponentName [in]

Null-terminated wide character string containing the logical name of the subcomponent to be added for restore.

The value of this parameter cannot be NULL.

There are no restrictions on the characters that can appear in a non-NULL component name.

-param bRepair [in]

This parameter is reserved for future use. This parameter should always be set to false

-returns

The following are the valid return codes for this method.

Value Meaning
S_OK
Successfully added the restore subcomponent.
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
The backup components object is not initialized, this method has not been called during a restore operation, or this method has not been called within the correct sequence.
VSS_E_INVALID_XML_DOCUMENT
The XML document is not valid. Check the event log for details. For more information, see Event and Error Handling Under VSS.
VSS_E_OBJECT_NOT_FOUND
The component does not exist.
VSS_E_UNEXPECTED
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.

-remarks

Before calling AddRestoreSubcomponent, the root component defined by the wszLogicalPath and wszComponentName parameters must first be selected for restore using IVssBackupComponents::SetSelectedForRestore.

If a requester is to support restoring subcomponents, this method must be called before IVssBackupComponents::PreRestore.

AddRestoreSubcomponent is intended for the case in which all the files in a writer's component set must be backed up as a unit, but where it is desirable that selected files (subcomponents) be capable of being restored individually.

To participate in such a restore, a subcomponent must have the bSelectableForRestore member of VSS_COMPONENTINFO set to TRUE. The component defined by the wszLogicalPath and wszComponentName parameters must also be selected for restore using IVssBackupComponents::SetSelectedForRestore.

See Working with Selectability for Restore and Subcomponents for more information.

-see-also

IVssBackupComponents

IVssBackupComponents::PreRestore

VSS_COMPONENT_TYPE