IVssWriterComponents::GetComponent method (vswriter.h)

The GetComponent method returns an IVssComponent interface to one of a given writer's components explicitly stored in the Backup Components Document.

Syntax

HRESULT GetComponent(
  [in]  UINT          iComponent,
  [out] IVssComponent **ppComponent
);

Parameters

[in] iComponent

Number of the component. The value of this parameter is an integer from 0 to n–1 inclusive, where n is the total number of components returned by IVssWriterComponents::GetComponentCount.

[out] ppComponent

Doubly indirect pointer to an instance of the IVssComponent object that contains component information.

Return value

The following are the valid return codes for this method.

Value Meaning
S_OK
Successfully returned the component.
E_INVALIDARG
One of the parameter values is not valid.
E_OUTOFMEMORY
The caller is out of memory or other system resources.
VSS_E_OBJECT_NOT_FOUND
The specified component was not found.

Remarks

The caller is responsible for calling IUnknown::Release to release system resources held by the returned IVssComponent object.

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

IVssWriterComponents