Application inside remote desktop? - DOTNET
This is a discussion on Application inside remote desktop? - DOTNET ; 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 ...
-
Application inside remote desktop?
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 wrote:
> 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?
>
Use GetSystemMetrics(SM_REMOTESESSION).
--Johannes
--
Johannes Passing - http://int3.de/
-
Re: Application inside remote desktop?
thank you,
i will give it a try.
"Johannes Passing" wrote:
> ARTMIC wrote:
> > 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?
> >
>
> Use GetSystemMetrics(SM_REMOTESESSION).
>
> --Johannes
>
> --
> Johannes Passing - http://int3.de/
>
-
Re: Application inside remote desktop?
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...?
"Johannes Passing" wrote:
> ARTMIC wrote:
> > 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?
> >
>
> Use GetSystemMetrics(SM_REMOTESESSION).
>
> --Johannes
>
> --
> Johannes Passing - http://int3.de/
>
-
Re: Application inside remote desktop?
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
ARTMIC wrote:
> 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...?
>
>
> "Johannes Passing" wrote:
>
>> ARTMIC wrote:
>>> 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?
>>>
>> Use GetSystemMetrics(SM_REMOTESESSION).
>>
>> --Johannes
>>
>> --
>> Johannes Passing - http://int3.de/
>>
--
Johannes Passing - http://int3.de/
-
Re: Application inside remote desktop?
"ARTMIC" <ARTMIC@discussions.microsoft.com> wrote in message
news
B1A44D4-3C7B-459C-BAD9-5B9586911C6C@microsoft.com...
> 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?
>
Check the System.Windows.Forms.TerminalServerSession Property, no need to
interop with unmanaged stuff.
Willy.
-
Re: Application inside remote desktop?
>Check the System.Windows.Forms.TerminalServerSession Property, no need to
/\
SystemInformation.
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
-
Re: Application inside remote desktop?
Thanks, that did the trick also 
"Mattias Sjögren" wrote:
> >Check the System.Windows.Forms.TerminalServerSession Property, no need to
> /\
> SystemInformation.
>
>
> Mattias
>
> --
> Mattias Sjögren [C# MVP] mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
>
-
Re: Application inside remote desktop?
Thanks for the help i will try that next.
"Johannes Passing" wrote:
> 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
>
> ARTMIC wrote:
> > 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...?
> >
> >
> > "Johannes Passing" wrote:
> >
> >> ARTMIC wrote:
> >>> 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?
> >>>
> >> Use GetSystemMetrics(SM_REMOTESESSION).
> >>
> >> --Johannes
> >>
> >> --
> >> Johannes Passing - http://int3.de/
> >>
>
>
> --
> Johannes Passing - http://int3.de/
>
-
Re: Application inside remote desktop?
"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
news:uRib%23OULIHA.4196@TK2MSFTNGP04.phx.gbl...
> >Check the System.Windows.Forms.TerminalServerSession Property, no need to
> /\
> SystemInformation.
>
>
Oops, I knew I was missing something ;-)
Willy.
Similar Threads
-
By Application Development in forum DOTNET
Replies: 1
Last Post: 11-22-2007, 03:11 PM
-
By Application Development in forum DOTNET
Replies: 15
Last Post: 06-04-2007, 09:09 PM
-
By Application Development in forum Java
Replies: 4
Last Post: 10-31-2005, 07:26 AM
-
By Application Development in forum DOTNET
Replies: 3
Last Post: 02-22-2005, 05:34 PM
-
By Application Development in forum Clarion
Replies: 0
Last Post: 04-15-2004, 01:28 PM