Re: remote desktop user detection



On Apr 1, 1:29 am, Serrator <serra...@xxxxxx> wrote:
Hi,

I have an application that is running in a remote Desktop session. I
need I way to detect if the user is currently attached to the session.

tia


Hi,

You can use the following APIs to list terminal server sessions:

GetSystemMetrics() SM_REMOTESESSION

GetCurrentProcessId()

ProcessIdToSessionId()

WTSGetActiveConsoleSessionId()

WTSEnumerateSessions()

WTSEnumerateProcesses()

WTSQuerySessionInformation()


http://msdn2.microsoft.com/en-us/library/ms724385.aspx

http://msdn2.microsoft.com/en-us/library/ms683180(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa382990(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383835(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383833(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383831(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383838(VS.85).aspx

Kellie.

.



Relevant Pages

  • Re: Find interactive user name / token (again) problems
    ... WTSEnumerateSessionsn fails if the Terminal Services service (TermService is ... only one user can logon at a time to session zero. ... WTSEnumerateSessions is not suitable because I need to support ...
    (microsoft.public.win32.programmer.kernel)
  • WTSEnumerateSessions and Welcome Screen
    ... I have WTSEnumerateSessions working with WTSEnumerateProcesses to get ... all Terminal Services users. ... WinStation to see if a session is active. ... Or if CPP is the only way perhaps a full project I ...
    (microsoft.public.platformsdk.security)
  • RE: WTSEnumerateSessions and Welcome Screen
    ... implements terminal services differently than 2000 and 2003. ... session, but the session remains active with no logged on user. ... > I have WTSEnumerateSessions working with WTSEnumerateProcesses to get ... Or if CPP is the only way perhaps a full project I ...
    (microsoft.public.platformsdk.security)
  • Re: remote desktop user detection
    ... I have an application that is running in a remote Desktop session. ... WTSEnumerateSessions() ... WTSQuerySessionInformation() ...
    (microsoft.public.win32.programmer.networks)
  • Re: WindowsStationDesktop Problem
    ... the remote desktop session, the station\desktop used are the ones extracted ... from that session, which, according to what you say doesn't really represent ... Capture device enumeration fail to show all devices while executing ... The launcher application is intended to be launched from the remote ...
    (microsoft.public.win32.programmer.kernel)