issues with WS2_32.dll behavior between windows 10 vs windows7

 ̄綄美尐妖づ 提交于 2019-12-13 03:18:49

问题


Did not find any suitable solution with existing questions so asking new question here. We use log4cxx which has WS2_32.LIB as dependency. WS2_32.LIB is present in Windows SDK version 10.0.16299.0. When using this log4cxx.dll on windows7 WS2_32.dll and all its dependencies gets loaded properly and application start normally.

but in windows 10 environment WS2_32.dll expects dependent dll's like API-MS-WIN-CORE-CRT-L1-1-0.DLL which are not part of windows10 or any of the microsoft visual c++ Redistributable which results in application error.

difference in WS2_32.dll and its dependencies between Windows7 and windows10 are clearly visible via dependency walker.

WS2_32.dll on windows 10:

whereas WS2_32.dll on windows7 is

as shown here API-MS-WIN-CORE-CRT-L1-1-0.DLL is not a dependent dll in windows7 where as its in windows 10 which is not present in the system resulting in application error.

So what should be the way to make the application run successfully? what alternate dependency should be provided instead of WS2_32.LIB while compiling log4cxx.dll to avoid this issue in windows 10? Also where to find documentation about such changes between windows OS versions? Please suggest.


回答1:


The old depends.exe doesn't support those API sets and shows wrong data.

use the open source replacement called Dependencies:

Dependencies is a rewrite of the legacy software Dependency Walker which was shipped along Windows SDKs, but whose developement stopped around 2006. Dependencies can help Windows developers troubleshooting their dll load dependencies issues.



来源:https://stackoverflow.com/questions/54241382/issues-with-ws2-32-dll-behavior-between-windows-10-vs-windows7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!