DOCUMENT:Q311815 10-DEC-2001 [winnt] TITLE :PRB: WSACleanUp() AV If Host Name Longer Than 54 Characters PRODUCT :Microsoft Windows NT PROD/VER::4.0 OPER/SYS: KEYWORDS:kbAPI kbWinsock kbDSupport kbGrpDSNet ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Windows NT Server version 4.0 - Microsoft Windows NT Workstation version 4.0 ------------------------------------------------------------------------------- SYMPTOMS ======== When you run gethostbyname(), gethostbyaddr(), or gethostname() on a Windows NT 4.0-based computer, the API returns the correct information. However, when you call WSACleanUp(), an access violation occurs and the program fails. NOTE: This problem does not occur on Windows 2000. RESOLUTION ========== To avoid this problem, do not use host names that contain more than 54 characters. STATUS ====== Microsoft has confirmed this to be a problem in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Right-click Network Neighborhood, and then click Properties. 2. Click the Protocol tab, and then select TCP/IP. 3. Click the Properties button. 4. Click the DNS tab. Change the host name to a name that has at least 54 characters. 5. Run the following code: #include #include int main(int argc,char* argv[]) { WSADATA wsaData; char pStr[512]={0}; int ret; if(WSAStartup(0x0101,&wsaData)) { cout<<"WSAStartup "; cout << " error: ?<