Click here to Skip to main content
Sign Up to vote bad
good
See more: C#Remote
Hello all,
We've met a problem using RDP: unable to force log-off the remote session. That means, when we, let's say, press "Escape" button on the remote host, the session is logged off, our server gets corresponding event
rdp.Disconnect(); 
and everybody is happy.
BUT sometimes we have to disconnect "by force". In this case, after
rdp.Disconnect()
the session is left open, and that's not good. Smile | :)
I found
rdp.Invoke()
method, but it gets function delegate as a parameter, and executing this function results in actions on the host and not on the remote one Frown | :(
We tried to call Shutdown.exe, but it can't logoff remote hosts (options "/l" and "/m //servername" cannot be used together).
 
So, there're two questions:
- How to close remote session ?
- How does rdp.invoke() works ?
Any help will be highly appreciated.
Julia.
Posted 24 Mar '12 - 23:38
Edited 25 Mar '12 - 0:43


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 523
1 Mahesh Bailwal 393
2 Maciej Los 205
3 Aarti Meswania 200
4 Tadit Dash 145
0 Sergey Alexandrovich Kryukov 9,607
1 OriginalGriff 7,214
2 CPallini 3,943
3 Rohan Leuva 3,261
4 Maciej Los 2,758


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 25 Mar 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid