This method creates a new collection type, attaches it to this interface, and associates it with the specified relationship type.
HRESULT CreateRelationshipColDef(
VARIANT sObjId,
BSTR Name,
long iDispId,
boolean IsOrigin,
short fFlags,
IReposTypeInfo *pIRelshipDef,
ICollectionDef **pICollectionDef
);
Parameters
sObjId [in]
The object identifier for the collection type. The Repository engine will assign an object identifier if you set this parameter to OBJID_NULL.
Name
[in]
The name of the new collection type.
iDispId [in]
The dispatch identifier to be used for Automation access to collections of this type.
IsOrigin [in]
Specifies whether collections of this type are origin collections.
fFlags
[in]
Flags that specify naming, sequencing, and delete propagation behavior for the collection type. (See the CollectionDefFlags Enumeration for a list of values and their specific purposes.)
*pIRelshipDef [in]
The interface pointer for the relationship definition object to which this collection type is connected.
*ppICollectionDef
[out]
The interface pointer for the new collection definition object.
Return Value
S_OK
The method completed successfully.
Error
This method failed to complete successfully.
Remarks
By default, the collection definition specifies that zero to many items are permitted in collections of this type. To specify a different minimum and maximum item count for the new collection type, change the MinCount and MaxCount properties before committing the transaction that contains this method invocation.