The WTSDisconnectSession function disconnects the logged-on user from the specified Terminal Services session without closing the session. If the user subsequently logs on to the same terminal server, the user is reconnected to the same session.
3/16/2007 8:37:29 AM - -147.32.123.252
.
static extern bool WTSDisconnectSession(IntPtr hServer, int sessionId, bool bWait);
.
Private Shared Function WTSDisconnectSession(ByVal hServer As IntPtr, ByVal SessionId As Integer, ByVal bWait As Boolean) As Boolean