Home All Groups Group Topic Archive Search About

Detect if running in terminal server session

Author
24 Mar 2005 9:14 PM
Oenone
Is it possible to detect whether my application is running within a Terminal
Server session or not?

I'd like to automatically switch off some of my graphics rendering under
this environment as they can be quite slow to transfer over a terminal
server session. The graphics should still be displayed when running directly
on a local session.

Thanks,

--

(O)enone

Author
25 Mar 2005 10:32 AM
Mattias Sjögren
>Is it possible to detect whether my application is running within a Terminal
>Server session or not?

GetSystemMetrics(SM_REMOTESESSION)

http://msdn.microsoft.com/library/en-us/sysinfo/base/getsystemmetrics.asp



Mattias

--
Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Author
25 Mar 2005 11:53 AM
Oenone
Mattias Sjögren wrote:
>> Is it possible to detect whether my application is running within a
>> Terminal Server session or not?
>
> GetSystemMetrics(SM_REMOTESESSION)
> http://msdn.microsoft.com/library/en-us/sysinfo/base/getsystemmetrics.asp

Brilliant -- thanks very much.

--

(O) e n o n e