Discuss this help topic in SecureBlackbox Forum

TElDNSSettings.ResolveHostName

TElDNSSettings     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Resolves IP address of the host.

Declaration

[C#]
    IPAddress ResolveHostName(string HostName, bool UseIPv6);

[VB.NET]
    Function ResolveHostName(ByVal HostName As String, ByVal UseIPv6 As Boolean) As IPAddress

[Pascal]
    function ResolveHostName(const HostName : string; UseIPv6 : Boolean; out Addr : TSockAddrStorage) : Boolean;
    function ResolveHostName(const HostName : string) : LongWord;

[C++]
    bool ResolveHostName(const std::string &HostName, bool UseIPv6, sockaddr_storage &Addr);

[PHP]
    bool ResolveHostName(string $HostName, bool $UseIPv6, sockaddr_storage &$Addr)

[Java]
    InetAddress resolveHostName(String HostName, boolean UseIPv6);

Parameters

  • HostName - name of the host for which the address is required
  • UseIPv6 - specifies if IPv6 protocol is used
  • Addr - address of the host

Return value

     [.NET]: returns the resolved IP address.
     [VCL]: if IPv6 is enabled, returns True if the address has been successfully resolved, and False otherwise. The resolved adress is contained in Addr parameter. If IPv6 is disabled, returns the resolved IP address.

Description

    Use this method to resolve IP address of the given host.
    Use AddressToString function to convert TSockAddrStorage record to string representation.

See also:     AddressToString    

Discuss this help topic in SecureBlackbox Forum