Internet Direct (Indy)
Home
PreviousUpNext
TIdStack.ResolveHost Method

Retrieves the host IP address for a host name.

Pascal
function ResolveHost(
    const AHost: string; 
    const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
): string;
Parameters 
Description 
AHost 
Host name to be resolved.
 
AIPVersion 
IP address family for the host name or IP address. 

string - IP address for the resolved host name.

ResolveHost is a string function that provides a common interface for resolving a host name or IP address. 

AHost is the host name to be resolved. When AHost is an IP address, no resolution is required and the value in AHost is assigned to the return value for the method. 

ResolveHost returns the IP loopback address (127.0.0.1) when AHost contains the value 'localhost'. 

For all other non-IP values in AHost, ResolveHost uses the HostByName method to access the GetHostByName() API for the protocol stack implementation.

HostByName

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.