Einzelnen Beitrag anzeigen

Benutzerbild von Remko
Remko

Registriert seit: 10. Okt 2006
Ort: 's-Hertogenbosch, Die Niederlande
222 Beiträge
 
RAD-Studio 2010 Arc
 
#5

AW: Terminalserver-Betrieb unter 64bit erkennen

  Alt 20. Feb 2015, 17:44
In my opinion reading the environment variable is the wrong way as there's no guarantee that the variable will be set.
The "proper" way is to call the GetSystemMetrics API with the SM_REMOTESESSION parameter.

Zitat:
This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services client session, the return value is nonzero. If the calling process is associated with the Terminal Services console session, the return value is 0.
Windows Server 2003 and Windows XP: The console session is not necessarily the physical console. For more information, see WTSGetActiveConsoleSessionId.
See my blog blog
See our Jedi blog
  Mit Zitat antworten Zitat