Delphi Testing if in a Terminal Services enviroment

By | March 15, 2011
Selec All Code:
1
2
3
4
5
6
7
8
//returns true if running under Windows Terminal Services
function TRemoteSession.IsRemoteSession: boolean;
(*
const  sm_RemoteSession = $1000;
*)
begin
  result := GetSystemMetrics(sm_RemoteSession) <> 0;
end;