How to fix DWMAPI.DLL delay-load dependency under WinXP?

后端 未结 4 640
感情败类
感情败类 2020-12-08 20:13

I have built a .dll under WinXP that claims it can\'t find DWMAPI.DLL when it\'s loaded. The problem is that this DLL is a Vista DLL, and this a known issue for XP users tha

4条回答
  •  爱一瞬间的悲伤
    2020-12-08 20:34

    This is a tricky one. There's really 2 main ways you will get this error.

    1) You have your project set to force delay loaded DLLs to load at application launch. DWMAPI.dll is a delay-loaded DLL and thus normally will not be loaded unless one of it's functions is called. That won't happen on XP unless you're trying to do it in your DLL. But it's possible to set a compiler option to force your app to load the delay loaded DLLs anyway. If you're doing that, don't.

    2) It's often a false error that you will get from depends.exe when there is another problem. Run your DLL through dependency walker and see if there are any other dependency problems. If all else fails, try uninstalling IE7 and see if the problem persists. If it is a false error, after you install IE7 you will see the real error. You can install IE7 again afterwards.

提交回复
热议问题