Group: Windows Sockets 2 (Winsock) - Library: ws2_32
How to build UDP responder
Winsock: retrieving the standard host name and IP address for the local machine
Retrieving the IP-to-physical address mapping table
How to create non-blocking Winsock server
int gethostname(
char FAR *name,
int namelen
);
DECLARE INTEGER gethostname IN ws2_32;
STRING @ name,;
INTEGER namelen
name [out] Pointer to a buffer that receives the local host name.
namelen [in] Length of the buffer.
If no error occurs, gethostname returns zero. Otherwise, it returns SOCKET_ERROR (-1) and a specific error code can be retrieved by calling WSAGetLastError.