AdsAmsDisconnect

This method is used to disconnect the ADS-OCX from the TwinCAT Router.

object.AdsAmsDisconnect() As Long

Parameter

-

Return value

-

Comments

All applications are closed when the present user logs out from Windows NT/2000/XP. If the program contains the ADS-OCX connected to the router, the program must disconnect from the TwinCAT Router. If this is not done, the program cannot be completely unloaded, and will still be seen in the NT Task Manager after a new login.

The disconnection from the TwinCAT Router is achieved through the AdsAmsDisconnect() method. This should be called in the Form_Unload() event.

Example

Private Sub Form_Unload(Cancel As Integer)
  Call AdsOcx1.AdsAmsDisconnect
End Sub