Is there a method in C# to retrieve the user name from a given session id?
(any session running on the system)
The Win API function WTSQuerySessionInformation
does this, but I'm searching for this funcationality in C#.
Is there a method in C# to retrieve the user name from a given session id?
(any session running on the system)
The Win API function WTSQuerySessionInformation
does this, but I'm searching for this funcationality in C#.
There seems to be no .NET integrated method for this.
So this is the current solution, using Windows Terminal services API: