Navigation: Advanced Topics > Clarion Language Utilities >====== IsTermServer (Verify Terminal Server Usage) ====== | |
ISTERMSERVER( )
ISTERMSERVER Detects Terminal Server usage
It is a good practice for applications to detect whether they are running in a Terminal Services Client session in order to optimize performance. For example, when an application is running on a remote session, it should eliminate unnecessary graphic effects. If a user is running the application directly on the terminal, it is not necessary for the application to optimize its behavior.
ISTERMSERVER is used to detect Terminal Server usage by returning the status of the System Metrics SM_REMOTESESSION flag. ISTERMSERVER returns TRUE if an application is running in a Terminal Services Client session, and FALSE if the application is running on the console.
This function is only valid for Windows 2000 or later.
To add support for this utility to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program:
INCLUDE('CWUTIL.INC'),ONCE
Return Data Type: BYTE
Example:
GLO:RemoteSessionActive = ISTERMSERVER() !is a remote session active?