AdsPortOpenEx
Establishes a connection (communication port) to the TwinCAT message router. Unlike with AdsPortOpen, a new ADS port is opened each time. The extended Ads functions have to be used for communicating with this port. The port number returned by AdsPortOpenEx is transferred as parameter to these functions. If no TwinCAT MessageRouter is present, the AdsPortOpenEx function will fail.
LONG AdsPortOpenEx(
void
);
Parameter
-
Return value
Port number of the opened Ads port. A return value of 0 means the call has failed.