IRepository::CreateObject

See Also

Creates the first version of a new Repository object. The specified COM interface pointer to the new object is passed back to the caller.

HRESULT CreateObject(
VARIANT sTypeId,
VARIANT sObjId,
IRepositoryObject *ppIReposObj
);

Parameters

sTypeId

[in]
The type of the new object; that is, the object identifier of the class definition to which the new object conforms.

sObjId

[in]
The object identifier to be assigned to the new object. Pass in OBJID_NULL to have the Repository assign an object identifier for you.

*ppIReposObj

[out]
The IRepositoryObject interface pointer for the new Repository object.

Return Value

S_OK

The method completed successfully.

Error

Values

This method failed to complete successfully.

Remarks

The new object will automatically create persistent storage for itself.

You can use this method only to create the first version of a Repository object. To create subsequent versions of the object, use IRepositoryObjectVersion::CreateVersion.