ITcTypeSystem::CreateType

Creates and registers a data type from an IEC declaration or XML. Support is provided for a direct IEC declaration, a single DataType element, and TcModuleClass/DataTypes. If the latter contains multiple DataType nodes, all types are imported, and S_OK is returned as *pipType = nullptr.

Signature

HRESULT CreateType(BSTR xml, ITcTypeInstance** pipType);

Parameter

Name

Type

Description

xml

BSTR

[in] IEC declaration or XML with type definitions.

Return value

Name

Type

Description

pipType

ITcTypeInstance**

[out, retval] Registered type; for multiple imports via TcModuleClass/DataTypes, the return value remains NULL.

(HRESULT)

HRESULT

S_OK if successful, otherwise an error code.

Error codes