IVssComponent::GetRestoreSubcomponent method (vswriter.h)
The GetRestoreSubcomponent method returns the specified subcomponent associated with a given component.
Either a writer or a requester can call this method.
Syntax
HRESULT GetRestoreSubcomponent(
[in] UINT iComponent,
[out] BSTR *pbstrLogicalPath,
[out] BSTR *pbstrComponentName,
[out] bool *pbRepair
);
Parameters
[in] iComponent
Index of the subcomponent. The value of this parameter is an integer from 0 to n–1 inclusive, where n is the total number of subcomponents associated with a given component. The value of n is returned by IVssComponent::GetRestoreSubcomponentCount.
[out] pbstrLogicalPath
Pointer to a string containing the logical path of the subcomponent. The logical path cannot be empty when working with subcomponents.
[out] pbstrComponentName
Pointer to a string containing the name of the subcomponent. The string cannot be empty.
[out] pbRepair
Reserved for future use.
Return value
The following are the valid return codes for this method.
Value | Meaning |
---|---|
|
Successfully returned the attribute value. |
|
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. |
|
The specified item was not found. |
Remarks
The caller should free the memory held by the pbstrLogicalPath and pbstrComponentName parameters by calling SysFreeString.
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 |