The gethostbyname function

The WSALookupServiceBegin query uses SVCID_INET_HOSTADDRBYNAME as the service class GUID. The host name is supplied in lpszServiceInstanceName. The WS2_32.DLL specifies LUP_RETURN_BLOB and the NSP places a hostent struct in the blob (using offsets instead of pointers as described above). NSPs should honor these other LUP_RETURN_* flags as well:

LUP_RETURN_NAME return the h_name field from hostent struct in lpszServiceInstanceName.
LUP_RETURN_ADDR return addressing info from hostent in CSADDR_INFO structs, port information is defaulted to zero. Note that this routine does not resolve host names that consist of a dotted internet address.