Need to programmatically Log Off Terminal Services Session

I have a Windows Application that is available to clients via Terminal Services. Need to know how to programmatically log the session off in C# or VB.NET on the user hitting the X in the upper right hand corner. Any help provided would be greatly appreciated
Who is Participating?
abdkhlaifConnect With a Mentor Commented:
you can close the Terminal Services session by logging off windows
take a look at this sample:
jazzcatoneAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.