If you would like to speak with one of our engineers, please Submit a Question or give us a call at the phone number here. In North America, To route your phone support request directly to a technical support engineer, call toll-free 1-888-382-1583 or 1-440-646-3434, select Option 3 (Technical Support), then select Option 5 (More Options). When prompted, enter the ThinManager Direct Dial Code 201.
Difference between revisions of "TermMon ActiveX Control"
|Line 69:||Line 69:|
Revision as of 16:25, 18 September 2012
Microsoft Terminal Services lacks the ability to monitor clients and provide much useful information. ACP has written an ActiveX component to overcome this shortcoming. The TermMon (Terminal Monitoring) ActiveX can be embedded into an application that will run on the terminal server. When a terminal starts a session on the terminal server and launches the application with the TermMon ActiveX, the ActiveX will create a socket connection to the terminal and is able to pull data from the terminal into the application for display. You can create tags for the data and populate them with data from the client via the ActiveX
Registering the Control
The TermMon ActiveX control must be registered before it can be used. Copy the file termmon.ocx from the ThinManager CD to the computer where you want to use it. Register the OCX by executing:
Using the Control
TermMon ActiveX Configuration Module
If running the Control in the terminal’s terminal services session, no special configuration of the terminal in ThinManager is required. The TermMon ActiveX Control Configuration Module is not required. If the Control is not run in the terminal’s terminal services session, the TermMon ActiveX Control Configuration Module must be added to the terminal configuration in ThinManager. In the module configuration, Allow ActiveX Connections must be set to YES and Only Allow Connections from Session must be set to NO.
The TermMon ActiveX Control Configuration Module can be used to prevent a connection from an application running in the terminal’s terminal services session. This is accomplished by adding the TermMon ActiveX Control Configuration Module to the terminal in ThinManager and setting the Allow ActiveX Connections option to NO.
The following properties are read only strings. An event will be generated any time one of these properties changes. The Enable method must be invoked prior to reading these properties.
- TerminalName - This is the name of the terminal.
- TerminalModel - This is the terminal model number.
- TerminalIP - This is the terminal IP address.
- TerminalMAC - This is the terminal MAC Address.
- TerminalBootLoaderVersion - This is the terminal network boot loader version.
- TerminalFirmwareVersion - This is the firmware version that the terminal is running.
- TerminalWindowsUsername - This is the Windows Username that is specified in the terminal’s ThinManager configuration.
- TermSecureUsername - This is the TermSecure username of the TermSecure user currently logged onto the terminal. If no TermSecure user is logged on, this value will be blank.
- TermSecureWindowsUsername - This is the Windows Username associated with a TermSecure user. This is the Windows Username for all TermSecure user sessions. If no TermSecure user is logged on, this value will be blank.
- TerminalServerGroupList - This is a comma-separated list of terminal server groups currently running on the terminal.
- ConnectionState - This is the Control’s connection state with the terminal.
- CurrentTerminalServerGroup - This is the Terminal Server Group that is currently being displayed on the terminal.
- CurrentWindowsUsername - This is the Windows Username of the session where the Control has been executed. This property is not available when the RunInSession property is set to False.
- TerminalServerName - This is the name of the Terminal Server where the Control is running. This property is not available when the RunInSession property is set to False.
These properties can be set by the application.
- RunInSession - When the RunInSession property is set to True, the Control will be running in the terminal’s terminal services session. The terminal IP address will be determined automatically by the control.
- OverrideIP - If the RunInSession property is set to False, the OverrideIP property specifies the IP Address of the terminal that the Control will connect to.
Note: To use the OverrideIP property, the TermMon ActiveX Control Configuration Module must be added to the terminal configuration in ThinManager. In the module configuration, Allow ActiveX Connections must be set to YES, and Only Allow Connections from Session must be set to NO.
- WatchdogTime – This is the number of seconds before the watchdog will reset the terminal session. Once this property is set to a non-zero value, the property must be updated before the watchdog time reaches zero. To disable the watchdog, set this property to zero. The watchdog is disabled by default.
Note: The Enable Method does not need to be called for watchdog operation. Watchdog operation is independent of the Enable and Disable Methods.
- ActiveScreen – For MultiMonitor configurations, this is the active screen number. A value of zero (default) will set the active screen to the screen the mouse pointer is on when a method or command is executed. A non-zero value will set the Active Screen to the screen number specified. All methods and commands will be executed on the specified screen.
When a property value changes, an event will be generated by the Control. When an Event occurs the event code can be used to determine the property that changed. The Event method must be invoked in order to receive events (except for WatchdogTime). The event code is provided by the Control as follows:
Enable - Invoking this method will enable the Control. The Control will attempt to connect to the terminal and generate events to update the Control Properties. The Control will maintain a connection to the terminal as long as it is enabled.
Disable - Invoking this method will cause the Control to break the connection with the terminal. Events will be generated to clear the Control Properties.
Command - The Command method can be used to send terminal action commands. The Command method requires one parameter which is the terminal command to be performed. The Enable method must be invoked before these commands can be executed (except for noted exceptions). The supported commands are:
- Reboot - This command will initiate a terminal reboot.
- Restart - This command will initiate a terminal restart.
- Calibrate - This command will initiate a touch screen calibration.
- GotoMainMenu - This command will cause the Main Menu to be displayed.
- SwitchToNextGroup - This command will switch to the next terminal server group.
- SwitchToPrevGroup - This command will switch to the previous terminal server group.
- SwitchInstFailover - This command will switch the instant failover group.
- ChangeTermSecureUser - This command will disconnect any current TermSecure user sessions and then display the TermSecure Log On menu.
- LogOffAndChangeTermSecureUser - This command will log off any current TermSecure user sessions and then display the TermSecure Log On menu.
- LogOffTermSecureUser - This command will log off any current TermSecure user sessions and will return to a terminal server group which is assigned to the terminal. If no terminal server groups have been configured on the terminal, the TermSecure Log On menu will be displayed.
- DisconnectTermSecureUser - This command will disconnect any current TermSecure user sessions and will return to a terminal server group which is assigned to the terminal. If no terminal server groups have been configured on the terminal, the TermSecure Log On menu will be displayed.
- DisconnectSession - This command will disconnect the Terminal Services Session running on the terminal. This command does not require that the Enable Method be invoked prior to execution.ACP TermMon ActiveX Control (Rev. 2) 4
- LogOffSession - This command will log off the Terminal Services Session running on the terminal. This command does not require that the Enable Method be invoked prior to execution.
The Command Method constants are provided by the Control as follows:
ChangeTerminalServerGroup - This method can be used to change the terminal server group currently displayed on the terminal. This method requires one parameter which is the name of the terminal server group that the terminal should switch to.
TermSecureCheckAccess - This method can be used to query the access rights of a TermSecure user. This method requires two parameters. The first parameter is the name of the user. The second parameter is the name of the Access Group. This method returns the result of the query as follows:
- TermMonConst.Timeout - The request timed out.
- TermMonConst.Busy - The Control is busy with another request.
- TermMonConst.InvalidMember - The user is not a member of the specified TermSecure Access Group.
- TermMonConst.ValidMember - The user is a member of the specified TermSecure Access Group.
- TermMonConst.UserNotFound - The TermSecure Username was not found.
- TermMonConst.GroupNotFound - The Access Group Name was not found.ACP TermMon ActiveX Control (Rev. 2) 5
Constant values provided by the Control are as follows: