INFO: How Database WinSock APIs Are Implemented in Win NT 3.5

ID: Q130024

The information in this article applies to:

SUMMARY

This article describes the ways in which various WinSock database APIs are implemented through the Windows NT versions 3.5 and 3.51 implementation of the WinSock DLL. The article covers the following WinSock database APIs: gethostbyname(), gethostbyaddr(), getprotobyname(), getprotobynumber(), getservbyname(), and getservebynumber().

MORE INFORMATION

Following are the steps taken by each API. In a case where more than one step may be taken to resolve the requested information, the process is not carried to the next step if the information is resolved in the current step.

gethostbyname():

1. Check the HOSTS file at %SystemRoot%\System32\DRIVERS\ETC. 2. Do a DNS query if the DNS server is configured for name resolution. 3. Query one or more WINS servers.

gethostbyaddr():

1. Check the HOSTENT cache. 2. Check the HOSTS file at %SystemRoot%\System32\DRIVERS\ETC. 3. Do a DNS query if the DNS server is configured for name resolution. 4. Do an additional NetBIOS remote adapter status to an IP address for its

   NetBIOS name table. This step is specific only to the Windows NT version
   3.51 implementation.

getprotobyname() and getprotobynumber():

1. Check the PROTOCOL file at %SystemRoot%\System32\DRIVERS\ETC.

getservbyname() and getservebynumber():

1. Check the SERVICES files at %SystemRoot%\System32\DRIVERS\ETC.

Additional query words:

Keywords          : kbnetwork kbAPI kbNTOS350 kbNTOS351 kbSDKPlatform kbWinsock kbGrpNet 
Issue type        : kbinfo

Last Reviewed: July 31, 1998