public static bool WTSRegister(IntPtr handle)
{
if (!SafeNativeMethods.WTSRegisterSessionNotification(handle, 1/*NOTIFY_FOR_ALL_SESSIONS*/))
{
LibraryLogging.Error("WTSRegisterSessionNotification error:{0}", LastError());
return false;
}
return true;
}