Home > Language Reference > Classes > StreamSocket
GetHostByName Function
Looks up a host IP address given its host name.
Syntax
Public Function GetHostByName(ByRef sHost As String) As String
| Parameter | Description |
| sHost | Domain name to be resolved. |
Remarks
The GetHostByName looks up a host IP address given its host name. The name should be specified in the sHost parameter. If the lookup is successful, the host IP address is returned as a string containing a dotted decimal address. If the name could not be resolved within the delay specified by the Timeout property, or if the lookup is unsuccessful, an empty string is returned.
This function can be used even if the socket was not previously opened by a call to the Connect.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |