CDnsClient::FormatAddress
INT FormatAddress(
DWORD dwAddress,  
LPTSTR lpszAddress,  
INT nMaxLength  
);
INT FormatAddress(
DWORD dwAddress,  
CString& strAddress  
);

The FormatAddress method converts a numeric IP address to a null-terminated string.

Parameters

dwAddress
A unsigned 32-bit integer which specifies the IP address to be converted into a string.
lpszAddress
A pointer to a null-terminated array of characters which will contain the converted IP address in dot-notation. This string should be at least 16 characters in length. If the Microsoft Foundation Classes are being used, the second form of this method may be called where a CString object is specified instead.
nMaxLength
The maximum number of characters which may be copied in to the string buffer.

Return Value

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

Requirements

Client: Requires Windows Vista, Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or Windows 2000 Server.
Header: Include cstools6.h.
Library: Use csdnsav6.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

GetAddress, GetHostByAddress, GetHostByName, GetHostInfo, GetHostServices, GetMailExchange, GetRecord


Copyright © 2008 Catalyst Development Corporation. All rights reserved.