Welcome to the ThinManager Knowledgebase.
Additional knowledgebase articles can be found at Rockwell Automation Tech Support.

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"

From ThinManager Knowledge Base
Jump to: navigation, search
(Control Constants)
(Control Constants)
Line 206: Line 206:
 
! scope="col"| Constant
 
! scope="col"| Constant
 
|-
 
|-
 +
! scope="row"| Reboot
 +
| 100
 +
|-
 +
! scope="row"| Restart
 +
| 101
 +
|-
 +
! scope="row"| Calibrate
 +
| 102
 +
|-
 +
! scope="row"| GotoMainMenu
 +
| 103
 +
|-
 +
! scope="row"| SwitchToNextGroup
 +
| 104
 +
|-
 +
! scope="row"| SwitchToPrevGroup
 +
| 105
 +
|-
 +
! scope="row"| SwitchInstantFailover
 +
| 106
 +
|-
 +
! scope="row"| ChangeTermSecureUser
 +
| 107
 +
|-
 +
! scope="row"| LogOffAndChangeTermSecureUser
 +
| 108
 +
|-
 +
! scope="row"| LogOffTermSecureUser
 +
| 109
 +
|-
 +
! scope="row"| DisconnectTermSecureUser
 +
| 110
 +
|-
 +
! scope="row"| DisconnectSession
 +
| 111
 +
|-
 +
! scope="row"| LogOffSession
 +
| 112
 +
|}
 +
 +
  
  
· TerminalWindowsUsername 7
 
· TermSecureUsername 8
 
· TermSecureWindowsUsername 9
 
· TerminalServerGroupList 10
 
· ConnectionState 11
 
· CurrentTerminalServerGroup 12
 
· CurrentWindowsUsername 13
 
· TerminalServerName 14
 
TermMonCommand
 
· Reboot 100
 
· Restart 101
 
· Calibrate 102
 
· GotoMainMenu 103
 
· SwitchToNextGroup 104
 
· SwitchToPrevGroup 105
 
· SwitchInstFailover 106
 
· ChangeTermSecureUser 107
 
· LogOffAndChangeTermSecureUser 108
 
· LogOffTermSecureUser 109
 
· DisconnectTermSecureUser 110
 
· DisconnectSession 111
 
· LogOffSession 112
 
 
TermMonConst
 
TermMonConst
 
· Success 0
 
· Success 0

Revision as of 17:23, 14 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:

regsvr32 path\termmon.ocx

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.

Read-Only Properties

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.ACP TermMon ActiveX Control (Rev. 2) 2 · 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.

Read-Write Properties

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.

Events

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: · TermMonEvent.TerminalName · TermMonEvent.TerminalModel · TermMonEvent.TerminalIP · TermMonEvent.TerminalMAC · TermMonEvent.TerminalBootLoaderVersion · TermMonEvent.TerminalFirmwareVersion · TermMonEvent.TerminalWindowsUsernameACP TermMon ActiveX Control (Rev. 2) 3 · TermMonEvent.TermSecureUsername · TermMonEvent.TermSecureWindowsUsername · TermMonEvent.TerminalServerGroupList · TermMonEvent.ConnectionState · TermMonEvent.CurrentTerminalServerGroup · TermMonEvent.CurrentWindowsUsername · TermMonEvent.TerminalServerName · TermMonEvent.WatchdogTime

Methods

· 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: o Reboot - This command will initiate a terminal reboot. o Restart - This command will initiate a terminal restart. o Calibrate - This command will initiate a touch screen calibration. o GotoMainMenu - This command will cause the Main Menu to be displayed. o SwitchToNextGroup - This command will switch to the next terminal server group. o SwitchToPrevGroup - This command will switch to the previous terminal server group. o SwitchInstFailover - This command will switch the instant failover group. o ChangeTermSecureUser - This command will disconnect any current TermSecure user sessions and then display the TermSecure Log On menu. o LogOffAndChangeTermSecureUser - This command will log off any current TermSecure user sessions and then display the TermSecure Log On menu. o 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. o 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. o 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 o 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: o TermMonCommand.Reboot o TermMonCommand.Restart o TermMonCommand.Calibrate o TermMonCommand.GotoMainMenu o TermMonCommand.SwitchToNextGroup o TermMonCommand.SwitchToPrevGroup o TermMonCommand.SwitchInstFailover o TermMonCommand.ChangeTermSecureUser o TermMonCommand.LogOffAndChangeTermSecureUser o TermMonCommand.LogOffTermSecureUser o TermMonCommand.DisconnectTermSecureUser o TermMonCommand.DisconnectSession o TermMonCommand.LogOffSession · 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: o TermMonConst.Timeout - The request timed out. o TermMonConst.Busy - The Control is busy with another request. o TermMonConst.InvalidMember - The user is not a member of the specified TermSecure Access Group. o TermMonConst.ValidMember - The user is a member of the specified TermSecure Access Group. o TermMonConst.UserNotFound - The TermSecure Username was not found. o TermMonConst.GroupNotFound - The Access Group Name was not found.ACP TermMon ActiveX Control (Rev. 2) 5

Control Constants

Constant values provided by the Control are as follows:

TermMonEvent Constant
TerminalName 1
TerminalModel 2
TerminalIP 3
TerminalMAC 4
TerminalBootLoaderVersion 5
TerminalFirmwareVersion 6
TerminalWindowsUsername 7
TermSecureUsername 8
TermSecureWindowsUsername 9
TerminalServerGroupList 10
ConnectionState 11
CurrentTerminalServerGroup 12
CurrentWindowsUsername 13
TerminalServerName 14
TermMonCommand Constant
Reboot 100
Restart 101
Calibrate 102
GotoMainMenu 103
SwitchToNextGroup 104
SwitchToPrevGroup 105
SwitchInstantFailover 106
ChangeTermSecureUser 107
LogOffAndChangeTermSecureUser 108
LogOffTermSecureUser 109
DisconnectTermSecureUser 110
DisconnectSession 111
LogOffSession 112



TermMonConst · Success 0 · Fail 1 · Disconnected 2ACP TermMon ActiveX Control (Rev. 2) 6 · Connected 3 · Timeout 4 · Busy 5 · Updating 6 · RequestFailed 7 · InvalidMember 8 · ValidMember 9 · UserNotFound 10 · GroupNotFound 11