Re: How to check if the program is running on a terminal server?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Runar Undheim wrote:

It is possible to check if the program run a remote session with
GetSystemMetrics(SM_REMOTESESSION)
but it is possible to find out if this is a terminal server or a remote desktop connection (to XP Pro)?

Call GetVersionEx with the OSVERSIONINFOEX structure. Check wSuiteMask for VER_SUITE_SINGLEUSERTS and VER_SUITE_TERMINAL flags.


-- Alex Fedotov

.