CSocketAddr::FindINET4Addr
Call this method to convert the IPv4 host name to the host address.
int FindINET4Addr(
const char *szHost,
int nPortNo,
int flags,
int sock_type,
);
Parameters
szHost
The host name or dotted IP address.nPortNo
The port number.flags
0 or combination of AI_PASSIVE, AI_CANONNAME or AI_NUMERICHOST.sock_type
Socket type (such as SOCK_STREAM).
Return Value
Returns zero if the address is calculated successfully. Returns a nonzero Windows Socket error code on failure. If successful, the calculated address is stored in a linked list that may be referenced using CSocketAddr::GetAddrInfoList and CSocketAddr::GetAddrInfo.
Remarks
This method calls the Win32 API function getaddrinfo to perform the conversion.
Requirements
Header: atlsocket.h