Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SessionChangeReason Enumeration

SessionChangeReason Enumeration

Specifies the reason for a Terminal Services session change notice.

Namespace:  System.ServiceProcess
Assembly:  System.ServiceProcess (in System.ServiceProcess.dll)

type SessionChangeReason

Member nameDescription
ConsoleConnectA console session has connected.
ConsoleDisconnectA console session has disconnected.
RemoteConnectA remote session has connected.
RemoteDisconnectA remote session has disconnected.
SessionLockA session has been locked.
SessionLogoffA user has logged off from a session.
SessionLogonA user has logged on to a session.
SessionRemoteControlThe remote control status of a session has changed.
SessionUnlockA session has been unlocked.

The following code example shows the use of the SessionChangeReason enumeration in an implementation of the OnSessionChange method in a class derived from ServiceBase. This code example is part of a larger example provided for the ServiceBase class.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft