Optimizing Applications for Windows 2000 Terminal Services and Windows nt server 0




Download 197,5 Kb.
bet48/49
Sana29.03.2021
Hajmi197,5 Kb.
#13691
1   ...   41   42   43   44   45   46   47   48   49

APPENDIX C



Detecting If an Application Is Running in a Console Session or Remote Session.
This code can be used to detect what type of Terminal Services session the application execution request is being initiated from. The Windows 2000 operating system or Service Pack 4 for Windows NT Server 4.0, Terminal Server Edition is required. On all other Win32 platforms, this code will always indicate that the process is running on the console. The following code is compatible with all Win32 platforms, however, the SM_REMOTESESSION value (defined in WINUSER.H) is only defined when you compile with a WINVER value >= 5.0.
if (GetSystemMetrics(SM_REMOTESESSION))

{

// App is running on a remote session.



} else {

// App is running on the console.

}




Download 197,5 Kb.
1   ...   41   42   43   44   45   46   47   48   49




Download 197,5 Kb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Optimizing Applications for Windows 2000 Terminal Services and Windows nt server 0

Download 197,5 Kb.