c# - TerminalServicesManager().CurrentSession.ClientName -


i trying figure out clients connected machine using remote desktop. read cassia , cassia.terminalservicesmanager, can't wrap mind around it...

i thought cassia.terminalservicesmanager().currentsession.clientname give me name of client, if there more? looked @ references, still confused. can me out?

thanks

it sounds you're looking this:

var manager = new terminalservicesmanager(); using (var server = manager.getlocalserver()) {     server.open();     foreach (var session in server.getsessions())     {         if (session.connectionstate == connectionstate.active)         {             console.writeline(session.clientname);         }     } } 

iterminalservicesmanager.currentsession returns session in current process running.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -