User Tools

Site Tools


istermserver_verify_terminal_server_usage_.htm
Navigation:  Advanced Topics > Clarion Language Utilities >====== IsTermServer (Verify Terminal Server Usage) ====== Previous pageReturn to chapter overviewNext page

ISTERMSERVER( )

blk2blue.jpg

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?

istermserver_verify_terminal_server_usage_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1