ITcSmTreeItem::ImportChild
Imports a child item from the clipboard or a previously exported file.
HRESULT ImportChild(BSTRbstrFile, BSTRbstrBefore, VARIANT_BOOLbReconnect, BSTRbstrName, ITcSmTreeItem**pipItem);
Parameters
bstrFile |
[in, defaultvalue(L"")] File name of the file from which the new child will be imported. If no file name specified (empty string) the child will be imported from the clipboard. |
bstrBefore |
[in, defaultvalue(L"")] If set, the parameter contains the name of another child item in front of which the new item should be inserted. If not set, the child will be appended at the end. |
bReconnect |
[in, defaultvalue(VARIANT_TRUE)] An optional flag that instructs the System Manager to try to reconnect the variables from the imported item to other variables in the configuration (by name). |
bstrName |
[in, defaultvalue(L"")] If set, overrides the child item name with its name in the import file. |
pipItem |
[out, retval] Points to the location of a ITcSmTreeItem interface pointer that receives the result. |
Return Values
S_OK |
function returns successfully. |
NTE_NOT_FOUND (0x80090011) |
the file can not be found/opened. |
NTE_BAD_SIGNATURE (0x80090006) |
the file does not contain a valid tree item. |
TSM_E_MISMATCHINGITEMS (0x98510004) |
the item in the file is not a valid child item. |