InteractiveSession InteractiveSession InteractiveSession InteractiveSession Class

Provides Remote Desktop information about the current session.

Syntax

Declaration

public static class InteractiveSessionpublic static class InteractiveSessionPublic Static Class InteractiveSessionpublic static class InteractiveSession

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 summary

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

Properties

  • IsRemote
    IsRemote
    IsRemote
    IsRemote

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

    public static bool IsRemote { get; }public static bool IsRemote { get; }Public Static ReadOnly Property IsRemote As boolpublic static bool IsRemote { get; }

    Property Value

    • bool
      bool
      bool
      bool

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

    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");
    

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.System.RemoteDesktop.dll