Topic Path: Symbol Reference > Classes > TIdIPAddress Class > TIdIPAddress Methods > MakeAddressObject Method
TIdIPAddress.MakeAddressObject Method

Creates a TIdIPAddress instance for an IP Address.

class function MakeAddressObject(
    const AIP: String
): TIdIPAddress;
IP address to use for initializing the object instance. 

TIdIPAddress - IP address instance.

MakeAddressObject is a TIdIPAddress class function used to return an initialized instance of TIdIPAddress using the IP address specified in AIP. AIP can contain the IP address in IPv4 (dotted-decimal) or IPv6 (colon-delimited hexadecimal) format. 

MakeAddressObject attempts to convert the IP address to IPv6 format. If an error is detected, MakeAddressObject attempts to convert the IP address to IPv4 format. AddrType is updated to indicated the IP version supported for the specified address. 

The return value for the method is Nil if the IP address contains neither an IPv4 nor an IPv6 internet address. For instance, using a host name or improperly formatted numeric IP address.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.