开发者

What version of the C Run-Time Library (CRT) is being loaded?

开发者 https://www.devze.com 2023-02-06 04:46 出处:网络
I have an error that I suspect might be c开发者_开发知识库aused by different versions of the CRT being loaded on two computers running Windows 7. How do I determine which version of MSVCR90.dll in the

I have an error that I suspect might be c开发者_开发知识库aused by different versions of the CRT being loaded on two computers running Windows 7. How do I determine which version of MSVCR90.dll in the winsxs folder is being loaded?

My program is a DLL being loaded by another EXE. It is compiled using Visual Studio 2008 SP1.


As Al Kepp answered, you can use Dependency Walker, "Depends.exe". For DLLs that are dynamically loaded, the best way is to profile the application as it loads your library.

In Dependency Walker open the EXE, not your DLL. Then click "Profile-->Start Profiling". If the application requires arguments you can provide them in the window that opens, otherwise just click "Ok" to launch the program. Once the program is open, use it in the normal way so that it loads your DLL. Now that your DLL is loaded, you should be able to browse the tree in Dependency Walker to see which versions of the CRT are being used.

If you can't see the version, ensure that the full paths are shown in the tree by clicking the "C:\" button.

You can also see which version of the CRT the application or library is requesting by checking the manifest, which is generally, but not always included in the DLL or EXE. in Visual Studio, click "File->Open->File..." and select the EXE or DLL. Open the RT_MANIFEST resource and you should see some XML which lists the CRT as a dependency and the version.


Most applications using these language libraries in DLL files use simply the latest version of those DLL in Windows directory. If you for some reason need some specific version, the easiest what you can do is probably to put those correct files to the same directory as your exe.

You can use Dependency Walker application to see which DLL files are loaded into your process on startup. You can download it from Microsoft site for free.

0

精彩评论

暂无评论...
验证码 换一张
取 消