Is there any windows API function to check if I am in a terminal service session?
+2
A:
Use
GetSystemMetrics(SM_REMOTECONTROL))
To determine if the calling session is being remotely controlled
and
GetSystemMetrics(SM_REMOTESESSION))
to determine if the calling session is associated with a remote session on a terminal server
http://msdn.microsoft.com/en-us/library/ms724385%28VS.85%29.aspx
cmsjr
2009-10-20 14:40:07