Click or drag to resize
Xcalibur Systems LLC Logo

ProcessHelperWTSGetActiveConsoleSessionId Method

Retrieves the session identifier of the console session. The console session is the session that is currently attached to the physical console. Note that it is not necessary that Remote Desktop Services be running for this function to succeed.

WTSGetActiveConsoleSessionId function


Namespace: Xcalibur.NativeMethods.V2.Processes
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("kernel32.dll")]
public static uint WTSGetActiveConsoleSessionId()

Return Value

UInt32
The session identifier of the session that is attached to the physical console. If there is no session attached to the physical console, (for example, if the physical console session is in the process of being attached or detached), this function returns xFFFFFFFF.
See Also