1

I'm currently reading the MSDN description of some Windows APIs, such as WTSEnumerateSessions for instance, and it has words, such as

... is used ... on a Terminal Server

and

... requires running Terminal Services

But there seems to be no explanation of what all that "terminal" stuff is and how can I make sure that it is actually running.

Can I be sure that every Windows XP SP3, Vista and Windows 7 machine has those terminal services running?

seva titov
  • 11,720
  • 2
  • 35
  • 54
ahmd0
  • 16,633
  • 33
  • 137
  • 233

1 Answers1

3

Terminal Services is the component of Windows that allows remote desktop sessions. Generally, you have a Windows Server that is running the Terminal Services role. Clients, whether it be a windows 7 box, or a thin client, connect to the terminal server using the RDP protocol.

WTSEnumerateSessions is meant to be run on such a server and returns a enumerated list of client sessions.

Windows XP, Vista, and 7 all have the ability to host remote desktop sessions, however it is not as powerful as the actual Terminal Services (now called Remote Desktop Services in Windows Server 2008 R2) role.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
cocoahero
  • 1,302
  • 9
  • 12
  • Thank you. Still, can I be sure that all those WTS... APIs will run on a Windows XP SP3 and later? – ahmd0 Oct 17 '11 at 03:08
  • Yes, I believe they will. Those services are enabled by default, and if the API is as robust as it should be, it should be able to handle the edge case that TS is not running (and return a empty list or an error). – cocoahero Oct 17 '11 at 03:12
  • Just from curiosity, how would you stop that terminal server? – ahmd0 Oct 17 '11 at 03:19
  • You can disable the ability to "remote desktop" to the computer using the menu in Computer Properties -> Remote. To stop the actual service, open the Services control panel (Start -> Run -> services.msc) – cocoahero Oct 17 '11 at 03:26