public static int GetSessionId()
{
int ret=0;
try
{
ret = SafeNativeMethods.WTSGetActiveConsoleSessionId();
}
catch
{
LibraryLogging.Error("GetSessionId() WTSGetActiveConsoleSessionId Error:{0}", LastError());
}
return ret;
}