ITcSmTreeItem::ImportChild

Imports a child from an XML/XTI file. The file is loaded; the system checks whether the loaded item can be inserted as a child or, if applicable, as a sibling; the item is inserted; modified flags are set; variable IDs are reassigned; and mappings are restored as needed.

Signature

HRESULT ImportChild(BSTR bstrFile, BSTR bstrBefore, VARIANT_BOOL bReconnect, BSTR bstrName, ITcSmTreeItem** pipItem);

Parameter

Name

Type

Description

bstrFile

BSTR

[in, defaultvalue(L"")] File from which to import.

bstrBefore

BSTR

[in, defaultvalue(L"")] Optional cursor name before which the insertion will take place.

bReconnect

VARIANT_BOOL

[in, defaultvalue(-1)] If not set to VARIANT_FALSE, existing mapping information is re-established.

bstrName

BSTR

[in, defaultvalue(L"")] Optional new name for the imported item.

Return value

Name

Type

Description

pipItem

ITcSmTreeItem**

[out, retval] Imported Tree Item.

(HRESULT)

HRESULT

S_OK if successful, otherwise an error code.

Error codes