AddToOrigCollection
Purpose
The CMetaObject class AddToOrigCollection function adds the specified origin class object ID to the collection of this CMetaObject for the specified relationship ID.
Description
The relationship ID is specified by the GUID relationship ID or the internal relationship ID (one must be set).
AddToOrigCollection only creates a relationship between the current version of this CMetaObject and the current version of the object referenced by lOrigID. If explanatory information, sExplanation, is provided, it will be included in the new entry. If necessary, AddToOrigCollection will determine the current version for the current object and lOrigID.
Requirements
The internal object id must be set in the object and it must be for a version of the object. lOrigID must be for a version of an object. CMetaObject must be an object in the destination class and lOrigID must be an object in the origin class of the relationship.
Syntax
HRESULT AddToOrigCollection(
const OBJECTID_t lOrigID,
const GUID &gRelID,
const OBJECTID_t lRelID = NULLLOID);
HRESULT AddToOrigCollection(
const OBJECTID_t lOrigID,
LPCTSTR sExplanation,
const GUID &gRelID,
const OBJECTID_t lRelID = NULLLOID);
Argument |
In/Out |
Description |
lOrigID |
In |
Origin ID of a version of the object to be added to the origin collection |
sExplanation |
In |
Explanatory Information, limited to 512 characters |
gRelID |
In |
GUID Relationship ID. |
lRelID |
In |
Internal Relationship ID. |