473,388 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Detect if running in terminal server session

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
Nov 21 '05 #1
2 4056
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...temmetrics.asp

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 21 '05 #2
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...temmetrics.asp


Brilliant -- thanks very much.

--

(O) e n o n e
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David | last post by:
Does anyone know how I can tell if my application is running in either a Terminal Server session or Citrix session vs. running on the local computer? David Hodgkins, MCSD, MCDBA, MCSE
5
by: Sara_S | last post by:
I am ready to move my ASP web site onto a remote host. The problem is that when I use Terminal Services to see the host machine, the error does not show up. (I was told that debugging info is only...
17
by: Gabriel Mejía | last post by:
Services or applications using ActiveX Data Objects (ADO) 2.0 or greater may intermittently return empty recordsets on queries that should be returning valid results. At the time the problem...
8
by: OHM | last post by:
Hi peoples, I dont know where to place this question, so as I know you guys are all resourceful experts, I thought I would try here. I am writing some code which will be run usingh remote...
2
by: Kevin Hodgson | last post by:
Is there any way in a .NET App to detect if it is being run under Terminal Server? I have some functions of my program (like launching emails, and saving files) that need to be handled...
9
by: Tim | last post by:
Hi Guys, I was wondering if there is a way to detect from with a C# app if it is being started in a remote session? i.e. someone has connected via remote desktop or terminal services... ...
2
by: Hitesh | last post by:
Hi, I need code in VB.Net to detect if the application is running on Terminal Server. I am using the following code. Please let me know if you see any issues in it or if you have some better code...
6
by: Smokey Grindle | last post by:
is there any way to detect if yoru app is runnign on a terminal server in ..net? so we can slim down graphics and such for it? thanks!
0
by: aliman | last post by:
Hi All, Coding in C#.Net 2.0 A requirement of my app is that certain functions should not be allowed to execute if excel is running. The app is used in terminal server sessions so checking if...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.