ITcSysManager::LinkVariables

The LinkVariables() method links two variables specified by their path names. The syntax of the path names must match the syntax described in LookupTreeItem. The method checks whether both items exist, are of the Variable type, and have compatible data types/sizes, and then sets the Mapping Modified flag.

Signature

HRESULT LinkVariables(BSTR bstrV1, BSTR bstrV2, long offs1, long offs2, long size);

Parameter

Name

Type

Description

bstrV1

BSTR

[in] Path name of the first variable. The full path name is required; each branch must be separated by a caret (^) or tab.

bstrV2

BSTR

[in] Path name of the second variable. The syntax is the same as for bstrV1.

offs1

long

[in, defaultvalue(0)] Bit offset of the first variable (used when the variables are of different sizes or only part of them is to be linked).

offs2

long

[in, defaultvalue(0)] Bit offset of the second variable.

size

long

[in, defaultvalue(0)] Number of bits to be linked. If set to 0, the smaller of the two variable sizes is used.

Return value

Name

Type

Description

(HRESULT)

HRESULT

S_OK if successful, otherwise an error code.

Error codes

See also