Moves items to different groups.
HRESULT SetParent (
[in] long ItemID,
[in] long ParentGroupID)
Parameter:
ItemID – Specifies which item is placed within the new parent.
ParentGroupID – The ID of the item that becomes the new parent for ItemID. The ParentGroupID must be a valid group id.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |
TE_E_INFOTREE_PARENTNOTGROUP |
The ParentGroupID entered is not a valid group id. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permission to work with this interface. |
E_INVALIDARG |
There is a problem with one or more of the arguments passed to this method. Use the IErrorInfo interface to extract more information about this error. |
Remarks:
Only group items (that were created via the IInformationTree5 interface) can be used as parent items. SetParent is equivalent to dragging an item into another group.