The information in this article applies to:
SYMPTOMS
If a computer has a hostname that is all numerals, or if the local computer name is all numerals, the Winsock Control will not function properly in two cases:
For example, if a computer name is named "1234567" then LocalIP returns 0.18.214.135. This potentially breaks applications when you use the bind method on the LocalIP property in certain situations. The reason for having a computer name of all numerals is for large installations that use it as a serial number. This is not a problem on Windows 2000 since it does not allow numeric computer names, however it would present a problem if trying to connect to a host with a numeric name. CAUSE
The Winsock Control tries to intelligently resolve names by using the inet_ntoa() Winsock API call to first try converting the name into an IP Address. If that succeeds, normal name resolution through gethostbyname() is bypassed. RESOLUTION
The only resolution is to use non-numeric hostnames or computer names with the Winsock Control, or use the Winsock API to resolve the names through the Winsock API SDK calls gethostname()/gethostbyname(). Q160215 HOWTO: Obtain the Host IP Address Using Windows Sockets Q154512 SAMPLE: Getting HostAddress Using Windows Sockets STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSome customer installations name the computers according to an asset tag or serial number that is all numerals. It is in these cases the problem manifests itself. Steps to Reproduce Behavior
REFERENCESFor more information, please refer to:
Additional query words:
Keywords : kbnetwork kbAPI kbCtrl kbSDKPlatform kbSDKWin32 kbVBp500 kbVBp600 kbDSupport kbGrpNet |
Last Reviewed: December 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |