Re: remote desktop user detection



On Apr 1, 1:29 am, Serrator <serra...@xxxxxx> wrote:
Hi,

I have an application that is running in a remote Desktop session. I
need I way to detect if the user is currently attached to the session.

tia


Hi,

You can use the following APIs to list terminal server sessions:

GetSystemMetrics() SM_REMOTESESSION

GetCurrentProcessId()

ProcessIdToSessionId()

WTSGetActiveConsoleSessionId()

WTSEnumerateSessions()

WTSEnumerateProcesses()

WTSQuerySessionInformation()


http://msdn2.microsoft.com/en-us/library/ms724385.aspx

http://msdn2.microsoft.com/en-us/library/ms683180(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa382990(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383835(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383833(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383831(VS.85).aspx

http://msdn2.microsoft.com/en-us/library/aa383838(VS.85).aspx

Kellie.

.