def adsPortCloseEx(port):<EOL>
port_close_ex = _adsDLL.AdsPortCloseEx<EOL>port_close_ex.restype = ctypes.c_long<EOL>error_code = port_close_ex(port)<EOL>if error_code:<EOL><INDENT>raise ADSError(error_code)<EOL><DEDENT>
Close the connection to the TwinCAT message router.