Miscallaneous error codes

The following error codes represent the HRESULT values of Automation Interface methods, as explained in the API reference.

typedefenum TCSYSMANAGERHRESULTS
{
    [helpstring("ITcSmTreeItem not found!" (ITcSmTreeItem nicht gefunden!))]
    TSM_E_ITEMNOTFOUND         = 0x98510001,
    [helpstring("Invalid Item Type!" (Ungültiger Elementtyp!))]                
    TSM_E_INVALIDITEMTYPE         = 0x98510002,
    [helpstring("Invalid SubItem Type!" (Ungültiger Unterelementtyp!))]        
    TSM_E_INVALIDITEMSUBTYPE        = 0x98510003,
    [helpstring("Mismatching Items!" (Nicht übereinstimmende Elemente!))]            
    TSM_E_MISMATCHINGITEMS         = 0x98510004,
    [helpstring("Corrupted Link" (Fehlerhafte Verknüpfung))]                
    TSM_E_CORRUPTEDLINK         = 0x98510005,
    [helpstring("Item still referenced!" (Element immer noch referenziert!))]        
    TSM_E_ITEMREFERENCED         = 0x98510006,
    [helpstring("Item already deleted!" (Element bereits gelöscht!))]        
    TSM_E_ITEMDELETED         = 0x98510007,
    [helpstring("XML Error" (XML-Fehler))]                    
    TSM_E_XMLERROR             = 0x98510008,
} TCSYSMANAGERHRESULTS;

Please note that the following list of COM error codes is just a snippet and not complete:

Error

Description

RPC_E_CALL_REJECTED

The COM-Server has rejected the call. Please read our article about how to implement an own Message Filter to circumvent this error.

Return value of method CoRegisterMessageFilter() <> 0

One cause of this error could be that the COM message filter has been applied to a MTA apartment. Message filters can only be applied to STA-Threads. Please view our Message Filter article for more information about message filters, including STA and MTA.

Error message "A reference to Beckhoff TwinCAT XAE Base 2.0 Type Library could not be added" when referencing the type library in Visual Studio.

The type library is not correctly registered. Please re-register the type library by executing the following command:
C:\Windows\Microsoft .NET\Framework\v4.0.xxxxx\regtlibv12.exe C:\TwinCAT3\Components\Base\TCatSysManager.tlb
xxxxxx is the version of the currently installed version of the .NET Framework 4.0.