How Database WinSock APIs Are Implemented in Windows NT 3.5

Last reviewed: September 29, 1995
Article ID: Q130024
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) versions 3.5 and 3.51

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 reference words: 3.50 3.51
KBCategory: kbnetwork kbnetwork
KBSubcategory: NtwkWinsock


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.