.
static extern bool WTSLogoffSession(IntPtr hServer, int SessionId, bool bWait)
.
Private Shared Function WTSLogoffSession(ByVal hServer As IntPtr, ByVal SessionId As Integer, ByVal bWait As Boolean) As Integer
.
If WTSLogoffSession(ptrOpenedServer, SessionID, False) <> 0 Then
.