DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
TerminalSession.h
Go to the documentation of this file.
1#pragma once
2
3#include "Common.h"
4#include "System/Object.h"
5#include "System/String.h"
8
9namespace DotNetDupe {
10 namespace System {
11 namespace Diagnostics {
12
28
47
53 class TerminalSession : public Object {
54 public:
57
60
65
69
73
74 private:
75#if defined(_WIN32)
76 static void QuerySessionDetails(unsigned long uSessionId, const String& sSessionName, RdpSessionState eState, RdpSessionInfo& info);
77 static String QueryWtsString(unsigned long uSessionId, unsigned int eInfoClass);
78 static RdpSessionState ConvertWtsState(int iState);
79#endif
80 };
81
82 }
83 }
84}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Represents a strongly typed list of objects that can be accessed by index mirroring ....
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Represents a strongly typed list of objects accessible by index.
Definition List.h:29
static Collections::Generic::List< RdpSessionInfo > GetSessions()
Enumerates all terminal sessions on the local system.
static Collections::Generic::List< RdpSessionInfo > GetDisconnectedSessions()
Enumerates disconnected terminal sessions available for reconnection.
static Collections::Generic::List< RdpSessionInfo > GetActiveSessions()
Enumerates only actively connected terminal sessions.
TerminalSession()
Initializes a new instance of TerminalSession.
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74
RdpSessionState
Represents the operational connection state of a Remote Desktop or Terminal session.
@ Down
Session is down or non-operational.
@ Connected
Client is connected to terminal session but logon not yet completed.
@ Shadow
Session is being shadowed by another session.
@ Active
User is logged on and actively interacting with the session.
@ Listen
Session is listening for incoming client connections.
@ Idle
Session is waiting for connection.
@ Disconnected
Session is disconnected but state preserved for reconnection.
@ ConnectQuery
Session is in process of connecting to client.
Contains extended telemetry for a Remote Desktop Protocol (RDP) session.
String sDomainName
Domain of the authenticated user account.
RdpSessionState eState
Current RDP connection state.
String sClientName
NetBIOS or DNS name of connecting client endpoint.
RdpSessionInfo()
Default constructor initializing default state.
bool bIsRdpSession
True if session is an active or disconnected RDP remote session.
String sUserName
User account associated with session.
String sClientIpAddress
IPv4 or IPv6 client address.
unsigned long uSessionId
Terminal Services session ID.
String sSessionName
Name of the WinStation (e.g. "Console", "RDP-Tcp#0").