If the method succeeds, the return value is length of the string.
A return value of zero indicates that no host file has been specified
or the method was unable to determine the file name. To get extended
error information, call GetLastError. If the last error is
zero, this indicates that no host file name has been specified for
the current thread. If the last error is non-zero, this indicates the
reason that the method failed.
This method only returns the name of the host file that is cached
in memory for the current thread. The contents of the file on the
disk may have changed after the file was loaded into memory. To
reload the host file or clear the cache, call the SetHostFile
method.
If a host file has been specified, it is processed before the
default host file when resolving a hostname into an IP address, or an
IP address into a hostname. If the host name or address is not found,
or no host file has been specified, a nameserver lookup is
performed.
The host file returned by this method may be different than the
default host file for the local system. To determine the file name
for the default host file, use the GetDefaultHostFile
method.