all groups > dotnet interop > november 2007 >
You're in the

dotnet interop

group:

Application inside remote desktop?



Application inside remote desktop? ARTMIC
11/22/2007 7:07:01 AM
dotnet interop: Did anyone ever need to know if your application is being run inside a remote
desktop session?
I have an application written in .Net 2.0
And I need to know if that application was started inside of a remote
desktop session.
Are there any win API calls I can call to find out if this is the case?
Re: Application inside remote desktop? ARTMIC
11/22/2007 7:34:01 AM
thank you,
i will give it a try.

[quoted text, click to view]
Re: Application inside remote desktop? ARTMIC
11/22/2007 8:00:01 AM
Ok thanks, that worked like a charm.

Now how do i know the info about the person that logs in through the remote
session? Like their user name, IP address, etc...?


[quoted text, click to view]
Re: Application inside remote desktop? ARTMIC
11/22/2007 12:39:02 PM
Thanks, that did the trick also :)


[quoted text, click to view]
Re: Application inside remote desktop? ARTMIC
11/22/2007 12:39:02 PM
Thanks for the help i will try that next.

[quoted text, click to view]
Re: Application inside remote desktop? Johannes Passing
11/22/2007 4:28:44 PM
[quoted text, click to view]

Use GetSystemMetrics(SM_REMOTESESSION).

--Johannes

--
Re: Application inside remote desktop? Johannes Passing
11/22/2007 5:28:20 PM
Refer to the Windows Terminal Services API documentation on MSDN:
http://msdn2.microsoft.com/en-us/library/aa383468.aspx
You probably want to use WTSQuerySessionInformation.

--Johannes

[quoted text, click to view]


--
Re: Application inside remote desktop? Willy Denoyette [MVP]
11/22/2007 8:32:29 PM
[quoted text, click to view]


Check the System.Windows.Forms.TerminalServerSession Property, no need to
interop with unmanaged stuff.

Willy.
Re: Application inside remote desktop? Mattias Sjögren
11/22/2007 9:10:20 PM
[quoted text, click to view]
/\
SystemInformation.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Re: Application inside remote desktop? Willy Denoyette [MVP]
11/23/2007 1:23:41 AM
[quoted text, click to view]

Oops, I knew I was missing something ;-)

Willy.
AddThis Social Bookmark Button