Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "wtsgetactiveconsolesessionid" in [All]

Enums

.

        /// For more information, seeWTSGetActiveConsoleSessionId.

.

    ''' Windows XP (v5.1+) This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services client session the return value is nonzero. If the calling process is associated with the Terminal Server console session the return value is zero. The console session is not necessarily the physical console - see WTSGetActiveConsoleSessionId for more information.

wtsapi32

.

Used in conjunction with WTSGetActiveConsoleSessionId and WTSFreeMemory.

.

            // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/wtsgetactiveconsolesessionid.asp

.

            /// The WTSGetActiveConsoleSessionId function retrieves the

.

            public static extern int WTSGetActiveConsoleSessionId();

.

                int currentSessionId = WTSGetActiveConsoleSessionId();

kernel32

.
Summary
The WTSGetActiveConsoleSessionId function retrieves the Terminal Services session currently attached to the physical console. The physical console is the monitor, keyboard, and mouse.
.

/// The WTSGetActiveConsoleSessionId function retrieves the Remote Desktop Services session that

.

private static extern uint WTSGetActiveConsoleSessionId();

.

/// Private Declare Function WTSGetActiveConsoleSessionId Lib "Kernel32.dll" Alias "WTSGetActiveConsoleSessionId" () As Int32

.

     uint result = WTSGetActiveConsoleSessionId();

.
Documentation
[WTSGetActiveConsoleSessionId] on MSDN

 
Access PInvoke.net directly from VS: