> I don't think identifying console sessions versus terminal server sessions
> is really a good plan.
We need to identify the workstation that the user is on (i.e. the physical
device with the keyboard and mouse attached). With a workstation (whether or
not fast user switching is in play) it's going to be the workstation the
application is actually running on. With a Terminal Server, it's a different
device altogether, it's the client PC, not the machine which is hosting the
application process. (I'm not at work and so I don't recall offhand the
different function calls for the different scenarios.)
This is the major reason we need to differentiate. On the other hand, if you
know of an API call such as GetUserWorkstation which does this transparently
for us then we wouldn't need to worry about it ourselves explicitly.
Thanks,
- Joseph Geretz -
"Jesper" <> wrote in message
news:995D1649-7646-4595-B63A-...
>> > Anyway, I'm finding that Vista assigns Session ID of 1 to the console
>> > session.
>
> Not quite correct. A console session can be any session other than 0. As
> for
> why the did that...
>
> Short answer: This was done to isolate services from interactive
> applications and prevent services from being hacked by end users.
>
> Longer answer:
> http://www.microsoft.com/whdc/system.../services.mspx
>
> I don't think identifying console sessions versus terminal server sessions
> is really a good plan. With Fast User Switching (which works in a domain
> in
> Vista) any session that is local can actually be a terminal services
> session.
> If you have to do it maybe the better option is to look for the session
> that
> hosts smss.exe or csrss.exe, or one of the other services? I don't know of
> an
> API that lets you identify the origin of a session.
>
>
>> It's done for a reason. If you read the old new thing blog at
>> http://msdn.microsoft.com/oldnewthing you'll see that whatever other
>> numerous faults we can assign to Microsoft, going around changing
>> important
>> system parameters just for a giggle to see how many apps they can break
>> in
>> one day isn't really one of them.
>
> Robert, that link doesn't work.