AdsPortCloseEx

The connection (communication port) to the TwinCAT message router is closed. The port to be closed must previously have been opened via an AdsPortOpenEx call.

LONG AdsPortCloseEx(
     long  nPort
);

Parameters

port

[in] port number of an Ads port that had previously been opened with AdsPortOpenEx.

Return value

Returns the function's error status.

Example

See example 2.