DnsFormatAddress Function  
 
INT WINAPI DnsFormatAddress(
  LPINTERNET_ADDRESS lpAddress,  
  LPTSTR lpszAddress,  
  INT nMaxLength  
);

The DnsFormatAddress function converts a numeric IPv4 or IPv6 address to a string.

Parameters

lpAddress
A pointer to an INTERNET_ADDRESS structure which specifies the numeric IPv4 or IPv6 address to be converted into a string.
lpszAddress
A null-terminated string which will contain the converted IPv4 address in dot-notation. This string should be at least 16 characters in length.
nMaxLength
The maximum number of characters which may be copied in to the string buffer.

Return Value

If the function succeeds, the return value is the length of the string buffer. If the function fails, the return value is zero. To get extended error information, call DnsGetLastError.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csdnsv11.lib
Unicode: Implemented as Unicode and ANSI versions

See Also

DnsGetAddress, DnsGetHostAddress, DnsGetHostInfo, DnsGetHostServices, DnsGetMailExchange, DnsGetRecord, INTERNET_ADDRESS