"MSVCP100.dll is either not designed to run on Windows or contains an error."

I have created a C ++ application using Visual Studio 2010 Express. When I tried to run it on a specific computer today, I got this error:

MyApplication.exe - Bad Image

C: \ My Application Path \ MSVCP100.dll is either not designed to run on Windows or contains an error. Try to install the program again using the original installation media, or contact your system administrator or software vendor for support.

The DLL described is one of the redistributable DLL versions of Visual C ++. My application installer used to run the Microsoft installer for these DLLs, but I recently modified it to install msvcp100.dll and msvcr100.dll along with my application. The new way worked fine on several other computers, although I can't rule out that it was only because the DLLs were already installed at the system level on those other computers.

What is causing this sudden DLL mismatch?


source to share

2 answers

With STATUS_INVALID_IMAGE_FORMAT, the Machine property in the DLL header does not match the application architecture.

Keep in mind that you will probably have two copies of this DLL on your build machine, x86 and x64. Later versions of VS have a 3rd copy, the ARM version. So chances are very high that you have chosen the wrong one. Usually you target x86, the one you tested, your program is stored in c: \ windows \ syswow64 directory. The 64-bit version is located in the c: \ windows \ system32 directory.

How these directories got these seemingly reversed names is another day's story :) Using the vc / redist subdirectory of the VS installation directory as the source for the copy is less ambiguous.



This .dll file is associated with Microsoft Visual C ++ 2010 Package : x64 Redistributable .

Try uninstalling the x64 package with Microsoft Visual C ++ 2010 Redistribution using the Add / Remove Programs item in Control Panel.

Then install the latest version of Visual C ++ on the site (file name = vcredist_x64.exe ):


Hope this helped.



All Articles