This function closes the hosts database file
(TCPIP$ETC:IPNODES.DAT), previously opened with a
gethostbyaddr(), gethostent(), or gethostbyname() function call.
If the most recent sethostent() function call is executed with
a nonzero stay_open parameter, the endhostent() function does
not close the hosts database file. You cannot close the hosts
database file until you make a call to exit(). A second call
to sethostent() is issued with a stay_open parameter equal
to 0 (zero). This ensures that a subsequent endhostent() call
succeeds.
Related Functions
See also gethostbyaddr(), gethostent(), and gethostbyname().