CIcmpClient::FormatAddress Method  
 
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. An alternate form of this method accepts a CString object which will contain the IP address in dotted notation when the method returns.
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

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

See Also

GetHostAddress, GetHostName, ResolveAddress