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 | [out, retval] Registered type; for multiple imports via | |
(HRESULT) | HRESULT |
|
Error codes
E_POINTER:pipTypeisNULL.ADS_E_ERROR: The input was neither a readable IEC declaration nor a processable XML format.