How to detect if there is an active connection to a server made through rdc?
<p>I need to write a program (in C#), to run in the client local machine, that will show a list of our windows servers (Sort of the server names in a ListBox) and let the user choose and subsequently connect via RDC. However, the program needs to know if the user is already connected to one of the listed servers, in which case the client will be advised to first disconnect from  previous session before continuing. The question is how to detect if there is already such an active connection in the user local machine? And better yet,  would it be possible to detect the ip address of this server, so that we can ignore the connection if it is not in one of our servers?</p>
