FIX: gethostbyaddr() May Cause an Invalid Page Fault on Win95

Last reviewed: November 7, 1997
Article ID: Q176354
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) on the following platforms: - Windows 95 - x86

SYMPTOMS

You might receive the following error message when you call gethostbyaddr() on Windows 95:

   This program has performed an illegal operation and will be shutdown.

When you click Details, the following details are displayed:

   <your app> caused an invalid page fault in module Kernel32.dll.

-or-

   <your app> caused an access violation fault in Kernel32.dll.

CAUSE

The gethostbyaddr API issues a NETBIOS Node Status Query if the address is not found in the local hosts file or a domain name server(DNS). However, due to this bug, if the target machine of this Node Status Query registers more than 10 netbios names, an Invalid Page Fault occurs in Kernel32.dll. If the target machine is many hops away, or network is slow, an Access Violation may occur in Kernel32.dll. This only happens under Windows 95.

RESOLUTION

This bug has been fixed in Winsock 2 for Windows 95. To work around this problem without applying the fix, manually add a PTR record to the DNS server for the target machine, or reduce the number of netbios names by stopping services whose names are registered.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Winsock 2 for Windows 95 SDK. It can be downloaded from ftp://ftp.microsoft.com/bussys/WinSock/winsock2.


Additional query words: winsock winsock2 dns netbios wins domain group
Keywords : NtwkMisc NtwkWinsock
Version : WIN95
Platform : Win95
Issue type : kbbug
Solution Type : kbfix


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: November 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.