Interactive​Session Interactive​Session Interactive​Session Class

Definition

Provides Remote Desktop information about the current session.

public static class InteractiveSessionpublic static class InteractiveSessionPublic Static Class InteractiveSession
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Note

: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment.

Properties

IsRemote IsRemote IsRemote

Indicates whether the calling process is running in a Remote Desktop session.

public static PlatForm::Boolean IsRemote { get; }public static bool IsRemote { get; }Public Static ReadOnly Property IsRemote As bool
Value
bool bool bool

Contains True if the current process is running in a remote session or False otherwise.

Attributes

Remarks

Examples

OutputTextBlock1.Text = String.Format("The current session is : {0}", 
    (InteractiveSession.IsRemote ? "Remote" : "Local"));
OutputTextBlock1->Text = "The current session is : " + 
	(Windows::System::RemoteDesktop::InteractiveSession::IsRemote ? "Remote" : "Local");
OutputTextBlock1.Text = String.Format("The current session is : {0}",
    (If(InteractiveSession.IsRemote, "Remote", "Local")))
document.getElementById("IsRemoteOutput").innerText = "The current session is : " +
    (Windows.System.RemoteDesktop.InteractiveSession.isRemote ? "Remote" : "Local");