Group: Windows Sockets 2 (Winsock) - Library: ws2_32
The gethostbyname function retrieves host information corresponding to a host name from a host database.
How to build UDP responder
Winsock: retrieving the standard host name and IP address for the local machine
Winsock: retrieving information from a host database for a given host name
Winsock: retrieving Web pages using sockets (HTTP, port 80)
Winsock: sending email messages (SMTP, port 25)
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Winsock: reading email messages (POP3, port 110)
Winsock: connecting to a news server (NNTP, port 119)
How to create non-blocking Winsock server
How to ping a remote site using ICMP API calls
struct hostent FAR *gethostbyname(
const char FAR *name
);
DECLARE INTEGER gethostbyname IN ws2_32;
STRING hostname
name [in] Pointer to the null-terminated name of the host to resolve.
If no error occurs, gethostbyname returns a pointer to the hostent structure described above. Otherwise, it returns a NULL pointer and a specific error number can be retrieved by calling WSAGetLastError.
The gethostbyname function has been deprecated by the introduction of the getaddrinfo function.