Meta Data Services Programming

IRepositoryObjectVersion::CreateVersion

This method creates a new version of an object as a successor to the current object version.

HRESULT CreateVersion(
    VARIANT sVersionID
    IRepositoryObjectVersion **ppCreatedVersion
);

Parameters

sVersionID

[in]
The object-version identifier to be assigned to the new object version. If you want the repository engine to assign an object-version identifier, use a value of EXTVERSIONID_NULL.

**ppCreatedVersion

[out]
The IRepositoryObjectVersion interface pointer for the newly created object version.

Return Value

S_OK

The method completed successfully.

Error Values

This method failed to complete successfully.

Remarks

The current object version must be frozen.

The repository engine creates the new version as unfrozen. Its property values are identical to the current object version's property values.

For each of the predecessor version's origin relationship collections, the repository engine takes this action:

You cannot invoke this method while operating in a workspace.

See Also

IRepositoryObjectVersion Interface