InfoConnect VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmTerminal Object / HostAddress Property
Example
In This Topic
    HostAddress Property (IbmTerminal)
    In This Topic
    Gets or sets the host address.
    Syntax
    expression.HostAddress As String
    where expression is a variable that represents a IbmTerminal Object
    Exceptions
    ExceptionDescription
    This exception is thrown when you modify a property that was secured via the Permissions Manager, or that can only be modified by an Administrator.
    Example

    This example prints the type of terminal along with some other information when a session view opens.
    To run this example, copy this code to the ThisFrame code window under the Common Project.

    You may need to add a reference to the Attachmate_Reflection_Objects_Emulation_OpenSystems library.

    Private Sub Frame_ViewOpened(ByVal sender As Variant, ByVal View As Attachmate_Reflection_Objects.View)
        
        Dim terminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmTerminal
        Dim terminalOs As Attachmate_Reflection_Objects_Emulation_OpenSystems.terminal
        Dim HostAddress As String
        Dim ConnectionType As String
        Dim port As Integer
       
        'print terminal type
        If TypeName(View.control) = "IbmTerminal" Then
      
            Set terminal = View.control
            
            HostAddress = terminal.HostAddress
            port = terminal.port
            
            Debug.Print "IBM", HostAddress, port
        
        ElseIf TypeName(View.control) = "Terminal" Then
     
            Set terminalOs = View.control
            
            'Check whether the connection is SSH
            If Not terminalOs.ConnectionType = ConnectionTypeOption_SecureShell Then
                   Debug.Print "This is not an SSH connection"
            End If
            
            Debug.Print "Open Systems"
            
        End If
    End Sub
    See Also