Hi, thanks for the reply. Actually, I want to know if a certain process is
running on the session (desktop) that has the keyboard and mouse. I
understand that there might be more than one user session (using the fast
user switch capability on WinXP) but I want to check for the session with
the user currently interacting with the computer.
I found the function "WTSGetActiveConsoleSessionId" from the terminal
services, but it's an unmanaged code, and I was wondering if there is any
.NET managed way to get the same info.
Thanks for the help,
> If you are asking whether the process is running under Terminal Services
> or
[quoted text clipped - 15 lines]
>
> Thanks
Siva M - 08 Sep 2006 18:53 GMT
Hello,
Its easy to use the same API from .NET
http://www.pinvoke.net/default.aspx/wtsapi32.WTSQuerySessionInformation
Hi, thanks for the reply. Actually, I want to know if a certain process is
running on the session (desktop) that has the keyboard and mouse. I
understand that there might be more than one user session (using the fast
user switch capability on WinXP) but I want to check for the session with
the user currently interacting with the computer.
I found the function "WTSGetActiveConsoleSessionId" from the terminal
services, but it's an unmanaged code, and I was wondering if there is any
.NET managed way to get the same info.
Thanks for the help,
> If you are asking whether the process is running under Terminal Services
> or
[quoted text clipped - 15 lines]
>
> Thanks
Ahmed Perlom - 08 Sep 2006 19:27 GMT
Thanks for the reply. I tried the PInvoke solution and it works. The
problem it is unmanaged code that need to run in full-trust mode. I was
looking for a managed code solution that would run in a lower privilege.
Cheers
> Hello,
>
[quoted text clipped - 35 lines]
>>
>> Thanks