Detect whether running on Remote Desktop?

  • Thread starter Thread starter Michael A. Covington
  • Start date Start date
M

Michael A. Covington

How can a C# application detect whether it is running on a Remote Desktop
vs. the computer's own desktop?

I realize that, for good reasons, this information is normally concealed
from the program!
 
Hi,
I know one thing that I figured out is that remote desktop sets your vga
colors to 256. You could check that, I am sure most clients run higher than
that these days.

Hope that helps,
 
Hi Michael,

If you are talking about a terminal services session on Win2000 or later
then the unmanaged code to do this is:

GetSystemMetrics( SM_REMOTESESSION );

Not sure if you can access this directly, but you can PInvoke it if
necessary.

Cheers

Doug Forster
 
Excellent - Just what I was looking for. Thanks!

"Doug Forster" <doug at _ZAPTHIS_
toniq_ZAPTHIS_DOT_ZAPTHIS_co_ZAPTHIS_DOTnz> wrote in message
 
Back
Top