/// <summary>
/// The WTSGetActiveConsoleSessionId function retrieves the
/// Terminal Services session currently attached to the physical console.
/// The physical console is the monitor, keyboard, and mouse.
/// </summary>
/// <returns>An <see cref="int"/> equal to 0 indicates that the current session is attached to the physical console.</returns>
/// <remarks>It is not necessary that Terminal Services be running for this function to succeed.
/// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/wtsgetactiveconsolesessionid.asp</remarks>
[DllImport("kernel32.dll")]
static extern int WTSGetActiveConsoleSessionId();
TODO
None.
None.
See WTSQuerySessionInformation
int currentSessionId = WTSGetActiveConsoleSessionId();
TODO