CIcmpClient::SetHostAddress Method  
 
INT SetHostAddress(
  DWORD dwAddress  
);
INT SetHostAddress(
  LPCTSTR lpszAddress  
);

The SetHostAddress method specifies the IP address of the host to receive an ICMP echo datagram. If the address specifies a new host, the current client statistics are reset.

Parameters

dwAddress
The IP address of the remote host as a 32-bit integer value, specified in network byte order. In an alternate form of this method, a pointer to a string which specifies the IP address in dotted notation may also be used.

Return Value

If the method succeeds, the return value is zero. If the method fails, the return value is ICMP_ERROR. To get extended error information, call GetLastError.

Remarks

To specify a remote host name, use the SetHostName method instead.

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

See Also

GetHostAddress, GetHostName, SetHostName