IVersionCol::Add
See Also
Adds an object version to the collection.
HRESULT Add(
IRepositoryObjectVersion *pIReposVersion
);
Parameters
- *pIReposVersion
- [in]
The IRepositoryObjectVersion interface pointer to the object version to be added to the collection.
Return Value
S_OK
The method completed successfully.
- Error
- Values
This method failed to complete successfully.
Remarks
There are many different kinds of Object-Version collections. You can apply this method to some of them, but not to others. This method works for:
- Target-Versions collections. You can use this method to enlarge the set of versions of a particular target object that are related to a particular source object.
- Versions-of-Workspace collections. You can use this method to add an object version to the set of items contained in the workspace.
This method does not work for:
- Predecessor-Versions collection. To enlarge an object version’s set of predecessors, use the MergeVersion method of the IRepositoryObjectVersion interface.
- Successor-Versions collection. To enlarge an object version’s set of successors, use the CreateVersion method of the IRepositoryObjectVersion interface.
- Versions-of-Object collection. To enlarge an object’s set of versions, use the CreateVersion method of the IRepositoryObjectVersion interface.
- Workspaces-of-Version collection. To enlarge the set of workspaces to which an object version belongs, you do not add a workspace to an object version—rather you add the object version to a workspace. In other words, you use the Add method of the IVersionCol interface, but the version collection you are manipulating is the Versions-of-Workspace collection, not the Workspaces-of-Version collection.
- Checkouts-of-Workspace collection To check out another item to a workspace, use the Checkout method of the IWorkspaceItem interface.
(c) 1988-1998 Microsoft Corporation. All Rights Reserved.