Programming with Reflection

image\rwnprg32.gif HostsFile property

 

Syntax

object.HostsFile
object.HostsFile = Value

Data type

String

 

Description

Returns (first syntax line) or specifies (second syntax line) the path to the Hosts file, which maps assigned recognizable host names to Internet addresses. This property is only relevant when the TransportType property is set to rcNetWareSAA (3270 sessions), rcTelnet, rcTelnetExtended, or rcMPTN.

Values

This string can be up to 260 characters long.

Notes

The purpose of this property is to allow Reflection to find a list of hosts to populate the Host name or IP address (Telnet in 3270 sessions and Telnet Extended), System name (MPTN), System name or IP address (Telnet in 5250 sessions), or Server (NetWare SAA over a TCP/IP network) list box in the Session Setup dialog box. When you start Reflection without a value for this property, Reflection looks for the Hosts file in the same directory as Wsock32.dll. If you are using a third-party TCP/IP stack, your Hosts file may be in another location. Reflection searches for the Hosts file in this order:

· In the same path as Wsock32.dll

· In the current folder

· In the operating system's root folder (for example, \Winnt)

· In the System subdirectory of the operating system's root directory

· In the folder where R8win.exe is installed

· In the folders in your path statement

When it finds a Hosts file, Reflection automatically sets the value of this property accordingly.

If Reflection cannot find your Hosts file in any of those locations, the value of the HostsFile property is set to an empty string.

All of the above information describes how Reflection is able to generate a list of hosts for the Host Name or IP Address list box. But the TCP/IP stack must also be able to find the Hosts file. If your PC is running Windows 2000 or Windows NT, your Hosts file must be in the Winnt\System32\Drivers\Etc folder. Finding a host name is not a problem when a Domain Name Server is in use and the TCP/IP software is configured to use the Domain Name Server.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this property