API for Determining if App is Running on Citrix or Terminal Services [closed]

There is an API function that lets you determine whether a specific user session is displayed on the console (locally) or via one the the remoting protocols Citrix ICA (nowadays called HDX) or Microsoft RDP. Call WTSQuerySessionInformation with 3rd parameter set to WTSClientProtocolType. The function returns: 0 for console sessions 1 for ICA sessions 2 … Read more