Socket 10106 problem-solving diary _socket

Source: Internet
Author: User
Haven't written a blog for a long time, these two days resolved a Create socket (socket) failure, error code of 10106 problem. Network programming Friends may have encountered similar problems, most can be done through the reload system. This time I would like to analyze the root causes of 10106, to provide you with another idea to solve similar problems.
"Environment" win7,64 bit system
"Phenomenon" CAD2006 platform program can not be networked, other programs are not a problem
"Cause of error" Create socket failed, error code 10106
"Try Method" 1. Test the network connection in the entry function of A.dll (loaded when not CAD program started), successful. 2. Test the network connection in the entry function of B.dll (loaded at CAD program startup) failed. 3. Manually loading Ws2_32.dll in the B.dll entry function succeeded, Mswsock.dll failed, error code 127. 4. Uninstall the user computer on the Kaspersky, No. 5. Uninstall the CAD reinstall and then use the registry mechanic to repair the registry to solve the problem.
"Causal analysis"       using Memdll loading mswsock.dll found to be a failure when correcting the IAT, specifically because the Wahdestroyhandlecontexttable function address was modified to fail, ws2_32. The function could not be found in the DLL module. We know that the 5.1 version of Ws2_32.dll does not export this function, which is exported in Ws2help.dll, but in version 6.1 (Win7), Ws2_32.dll exports the function.       Further debugging, after the successful loading of Ws2_32.dll in the B.dll entry function, the module path is obtained according to the module handle, and the Ws2_32.dll module path loaded in CAD2006 platform program is found under the cad2006 directory. Other programs are in the System32 directory.         It is puzzling that ws2_32.dll files are not found in the cad2006 directory, global search throughout the system, and only 3 Ws2_32.dll files are found in the system directory, and are all version 6.1. Manually copy a 6.1 version of the Ws2_32.dll file to the cad2006 directory, the problem remains. It is doubtful that the run-time environment of the CAD platform program is problematic (essentially a problem with the CAD runtime Environment), such as whether Ws2_32.dll is really loaded successfully. Gets the ws2_32.dll of the module handle is not deranged. Is it wrong to get the API of the module's directory according to the handle and so on.         attempts to obtain an interface in version 5.1, such as accept, from a loaded Ws2_32.dll module, can be successful, indicating that Ws2_32.dll has indeed been loaded and valid, except that the version is incorrect. is 5.1, not 6.1. Finally, the CAD uninstall off reinstall, the problem solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.