WTSEnumerateSessions and Welcome Screen

From: flat_ross (flat_ross_at_yahoo.com)
Date: 03/24/05


Date: 24 Mar 2005 01:34:57 -0800

Hello,

If there is a better NG for this, please let me know.

I have WTSEnumerateSessions working with WTSEnumerateProcesses to get
all Terminal Services users. I match up the unique process users'
sessions from WTSEnumerateProcesses with the SessionInfo structures
returned from WTSEnumerateSessions. I then check the Status and
WinStation to see if a session is active.

However, when I go Start -> LogOff to bring up the Welcome Screen,
terminal services is still reporting the session status as Active and
the station as Console. So I guess the Welcome Screen belongs to the
last user and it is not its own session. But I need to know that XP is
sitting on the Welcome Screen and therefore all users are disconnected
(from my perspective).

If the only answer is WTSRegisterSessionNotification, then may someone
supply either a CSharp or VB.NET example as I only have been able to
find CPP examples. Or if CPP is the only way perhaps a full project I
could just slap into VS7 and compile?

Thanks!



Relevant Pages

  • 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: 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)
  • 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: remote desktop user detection
    ... I have an application that is running in a remote Desktop session. ... WTSEnumerateSessions() ... WTSQuerySessionInformation() ...
    (microsoft.public.win32.programmer.networks)
  • Re: Stationsname und Sitzungs ID
    ... Schon mal im MSDN nachgeschaut, da gibts einiges in der Terminal Services API, u. a. ... WTSEnumerateSessions. ... Martin ...
    (microsoft.public.de.german.windows.terminaldienste)