Microsoft Internet Security and Acceleration Server 2000

IFWXFirewall::GetHostByName Method

Retrieves host information corresponding to a host name. This method is similar to the WinSock gethostbyname method.

HRESULT GetHostByName(
  const char *name,
  char *buf,
  int *buflen


[in] Pointer to the null-terminated name of the host.
[out] Pointer to the data area to receive the hostent data. The data area must be larger than the size of a hostent structure because the supplied data area is used by Windows Sockets to contain a hostent structure and all of the data referenced by members of the hostent structure. A buffer of MAXGETHOSTSTRUCT bytes is recommended.
[in, out] On input, specifies the size of data area for the buf parameter. If the buffer is too small, the error code ERROR_INSUFFICIENT_BUFFER is returned and the buflen parameter receives the size of the required buffer.

Return Values

Success, the buffer was filled with the host information.
Insufficient buffer space is available. (The buffer pointed to by buf is not large enough to contain the host information.)
Authoritative answer host not found.
A nonauthoritative host not found, or SERVERFAIL.
Valid name, no data record of requested type.


Unlike the IFWXSession::GetHostByName method, this method does not check permissions or site and content rules, does not log the name resolution, and cannot use autodial to dial out for the name resolution.