ITcTreeItemCollection2::Add
Adds an item to the collection and increments its reference counter. If duplicates are not allowed, the system first checks using Contains and rejects any item that is already present.
Signature
HRESULT Add(ITcSmTreeItem7* pItem);
Return value
Name | Type | Description |
|---|---|---|
(HRESULT) | HRESULT |
|
Error codes
-
E_POINTER:pItemisNULL. -
E_FAIL: The collection is read-only, or duplicates are not allowed, and the item is already included.