Download or generate msvcp71.dll? - windows

I wrote a large and complex C application on Windows XP. Now I am recompiling on a 64bit Windows 7 machine. When I run certain executables I get this error:
The program cannot start because MSVCP71.dll is missing from your computer. Try reinstalling the program to fix the problem.
Apparently this is a .dll that used to come with windows but now does not (see especially this MSDN forum and this previous stack overflow question.)
Supposedly I should generate this DLL from Microsoft Visual C++ and "extract the DLLs from the merge modules." However, I am using gcc, mingw and make and I would prefer to avoid going to Visual Studio.
There are lots of copies of this dll available to download from unverified sources on the internet, but none directly downloadable from Microsoft. What should I do? Do I need to install Microsoft Visual C++? Is there any way to do this with gcc and mingw?
Update: #Sheng Jiang 蒋晟's hint was crucial. What I hadn't realized was that my dependency on MSVCP71.dll only arises out of linking to a third party DLL. I was able to identify the third party DLL and find a copy of MSVCP71.dll running on another system with that DLL in place. Now I can include the MSVCP711.dll along with the third party DLL and everything runs smoothly.

There is no downloadable redistributable released for this file. Only merge modules are provided on the CDs. Programmers are expected to embed those merge modules into their setup programs, or extract the files into their program's install folder. This file is not intended for System32 as that is a violation of Windows Logo requirement.
Since you are not using the Visual C++ tool chain, the MS-STL dependency comes with a third-party component whose author did not provide a proper setup program. Although you can get the dll from other products, however, you need a product that explicitly grant you the redistribute rights to be able to redistribute the file to your customers. Such redistribute rights come with Visual C++ 2003 and probably InstallShield X and other install package authoring software.
For evaluate proposes you can obtain the file for the component from other products that have a dependency on the file, such as SQL Server 2005, the .Net 1.1 runtime or its SDK, Crystal Report 10 etc. Beware of version mismatch. If the component requires SP1 or later edition of MSVCP71.dll, it may not work with the RTM edition.

I dont have a link from Microsoft but you can download it from here (link fixed and now points to correct file).
Now move it to C:/Windows/SysWOW64 (64 Bit) or C:/Windows/System32 (32 Bit)
Here's another download available: http://www.addictivetips.com/windows-tips/fix-msvcp71-dll-and-msvcr71-dll-missing-error-in-windows-7/
Not sure if this will work, but maybe a reinstallation or update of MS VC++ Runtime solves that (Microsoft Download Center ).

MS Office, Oracle client, and sql developer all have msvcp71.dll. I found a copy already on my PC. No need to download from untrusted website.

It works if we copy the file msvcp71.dll from C:\ORACLE\product\10.2.0\Client_4\oui\lib\win32\msvcp71.dll and past the file in the folder C:\winnt\system32.

Related

“MSVCP100.dll is either not designed to run on Windows or it contains an error”

I built an application in C++ using Visual Studio 2010 Express. When I tried to run it on a certain computer today I got this error:
MyApplication.exe - Bad Image
C:\Path to My Application\MSVCP100.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support.
The DLL mentioned is one of the Visual C++ Redistributable DLLs. My application’s installer used to launch Microsoft’s installer for those DLLs but I recently tweaked it just to install msvcp100.dll and msvcr100.dll alongside my application. The new way worked fine on a handful of other computers, though I can’t rule out the possibility that that was only because the DLLs had already been installed at system level on those other computers.
What is causing this sudden DLL mismatch?
That's STATUS_INVALID_IMAGE_FORMAT, the Machine property in the DLL header doesn't match the architecture of the application.
Do keep in mind that you are likely to have two copies of this DLL on your build machine, the x86 and the x64 version. Later versions of VS have a 3rd copy, the ARM version. So very high odds that you picked the wrong one. Usually you'd target x86, the one you tested your program with is stored in the c:\windows\syswow64 directory. The 64-bit version is in c:\windows\system32.
How these directories got these seemingly backward names is a story for another day :) Favor using the vc/redist subdirectory of the VS install directory as a source for the copy, it is less ambiguous.
This .dll file is related to the Microsoft Visual C++ 2010 Redistributable x64 Package.
Try removing the Microsoft Visual C++ 2010 Redistributable x64 Package by using the Add or Remove Programs item in Control Panel.
Then, install the latest version Visual C++ (file name= vcredist_x64.exe) from the site:
http://www.microsoft.com/en-us/download/details.aspx?id=26999
Hope that helped..
If all above suggested solutions not worked for you than download MSVCR100.dll 32 bit or 64 bit as per your system configuration.
Download DLL from below link
https://www.sts-tutorial.com/sites/downloadCenter.php?MSVCR100
Follow da steps
1.Download the dll from here
https://www.sts-tutorial.com/sites/downloadCenter.php?MSVCR100
2.open with winrar
3.Extract MSVCR100.dll to C:\Windows\System32
hope it will work c:

VB6 Registration errors

I have a vb6 application installed on a server. It works perfectly.
I am trying to relocate it to a different server, however I get an error: "Component: TABCTL32.OSX or one of its dependencies is not registered". TABCTL32.OSX does not exist on this server.
On another Windows 2003 server I get a different error saying another component is not registered. I read somewhere that VB6 is not installed by default on Windows Server 2003 and I read somewhere else that it is. Is there a way to see if it is installed? I am unsure what to look for in Add/Remove Programs. Do I need to install this: http://support.microsoft.com/kb/192461?
As suggested by the topic Windows Server 2003 includes a new version of Msvbvm60.dll this OS certainly does include the VB6 core runtimes. However it is not guaranteed to have the base subset of auxiliary VB6 libraries Microsoft began calling the "Runtime Extended files" in Support Statement for Visual Basic 6.0 on Windows Vista, Windows Server 2008, Windows 7, and Windows 8.
In any case tabctl32.ocx must always be deployed anyway since it isn't included there.
The package described in VBRun60.exe installs Visual Basic 6.0 run-time file that you provided a raw link to is a sort of kludge and in any case is only meant for older versions of Windows (NT 4.0, Win9x) in the rare cases where you'd use it.
The VBRun60.exe file is not intended to replace the Package and
Deployment Wizard (PDW) for distributing Visual Basic applications.
For that matter it doesn't contain or have anything to do with tabctl32.ocx anyway.
Essentially what you are asking is not a development question and isn't appropriate for StackOverflow. It is an administrative issue more appropriate to somewhere like ServerFault instead.
If you aren't deploying this application using a proper installation package then that may loosely be considered a development issue, though it still really isn't.
Redistribute and register tabctl32.ocx in your setup.
If you do not have a setup, copy that file - preferably into (32 bit) windows\system32 folder or into the application's folder and issue the command regsvr32 tabctl32.ocx from within a command prompt with administrative privileges.

The application was unable to start correctly (0xc000007b)

I have a client/server app which I have been developing on a single PC. Now it needs two serial ports, so I borrowed a PC from a friend.
When I build my app and try to run or debug it (whether in the Delphi IDE or from Windows File manager), it errors "The application was unable to start correctly (0xc000007b)".
Googling doesn't bring up much, but seems to indicate that this is nothing Delphi specific and happens with other apps. It seems to be caused by calling into a 32 bit DLL from a 64 bit app or vice versa.
both PCs are Windows 7, 64 bit
both have Delphi Xe2 starter edition which can only handle 32 bits
The app runs fine on my PC, but not on my friend's
Other Delphi apps run just fine on both PCs
Can anyone give me a hint as to how to track this down?
Normally we get the 0xC000007B error-code (which means STATUS_INVALID_IMAGE_FORMAT), if:
If a 32-bit app tried to load a 64-bit DLL.
Or if a 64-bit app tried to load a 32-bit DLL.
Or if a 64-bit app tried to run on a 32-bit Windows.
To really know, I would suggest to test whether there is a problem between your application and its dependencies using dependency walker
Note that all you need to do is open your App using said tool, and issues appear as red log-entries at buttom of screen.
(At least, at time of writting, namely 2022)
Also, make sure you run the correct version of Dependency Walker, for example, the x86 version will display incorrect results when openning x64 binaries.
A load time dependency could not be resolved. The easiest way to debug this is to use Dependency Walker. Use the Profile option to get diagnostics output of the load process. This will identify the point of failure and should guide you to a solution.
The most common cause of this error is trying to load a 64 bit DLL into a 32 bit process, or vice versa.
I tried all the things specified here and found yet another answer. I had to compile my application with 32-bit DLLs. I had built the libraries both in 32-bit and 64-bit but had my PATH set to 64-bit libraries. After I recompiled my application (with a number of changes in my code as well) I got this dreaded error and struggled for two days. Finally, after trying a number of other things, I changed my PATH to have the 32-bit DLLs before the 64-bit DLLs (they have the same names). And it worked. I am just adding it here for completeness.
It is a missing dll.
Possibly, your dll that works with com ports have an unresolved dll dependence.
You can use dependency walker and windows debugger. Check all of the mfc library, for example. Also, you can use nrCommlib - it is great components to work with com ports.
It has been mentioned in earlier answers that using dependency walker is the way to go, in my case (my application keeps failing with the error code), dependency walker showed a few dll that are NOT relevant!
Finally figured out that I can run profiling by going to "profile" menu and it will run the application and stop at the exact dll that's cause the problem! I found out a 32bit dll was picked because of path and fixed it.
I experienced the same problem developing a client-server app using Microsoft Visual Studio 2012.
If you used Visual Studio to develop the app, you must make sure the new (i.e. the computer that the software was not developed on) has the appropriate Microsoft Visual C++ Redistributable Package. By appropriate, you need the right year and bit version (i.e. x86 for 32 bit and x64 for 64 bit) of the Visual C++ Redistributable Package.
The Visual C++ Redistributable Packages install run-time components that are required to run C++ applications built using Visual Studio.
Here is a link to the Visual C++ Redistributable for Visual Studio 2015 .
You can check what versions are installed by going to Control Panel -> Programs -> Programs and Features.
Here's how I got this error and fixed it:
1) I developed a 32 bit application using Visual Studio 2012 on my computer.
Let's call my computer ComputerA.
2) I installed the .exe and the related files on a different computer we'll call ComputerB.
3) On ComputerB, I ran the .exe and got the error message.
4) On ComputerB, I looked at the Programs and Features and didn't see Visual C++ 2012 Redistributable (x64).
5) On ComputerB, I googled for Visual C++ 2012 Redistributable and selected and installed the x64 version.
6) On ComputerB, I ran the .exe on ComputerB and did not receive the error message.
I recently had an issue where I was developing an application (that used a serial port) and it worked on all the machines I tested it on but a few people were getting this error.
It turns out all the machines that the error happened on were running Win7 x64 and had NEVER ONCE been updated.
Running a Windows update fixed all of the machines in my particular case.
Actually this error indicates to an invalid image format. However, why this is happening and what the error code usually means? Actually this could be appear when you are trying to run a program that is made for or intended to work with a 64 bit Windows operating system, but your computer is running on 32 bit Operating system.
Possible Reasons:
Microsoft Visual C++
Need to restart
DirectX
.NET Framework
Need to Re-Install
Need to Run the application as an administrator
Source: http://www.solveinweb.com/solved-the-application-was-unable-to-start-correctly-0xc000007b-click-ok-to-close-the-application/
This may be a case where debugging the debugger might be useful. Essentially if you follow the instructions here you can run two ide's and one will debug into the other. If you un your application in one, you can sometimes catch errors that you otherwise miss. Its worth a try.
I have seen the error trying to run VC++ debug executable on a machine which did not have Visual C++ installed. Building a release version and using that fixed it.
In my case the error occurred when I renamed a DLL after building it (using Visual Studio 2015), so that it fits the name expected by an executable, which depended on the DLL. After the renaming the list of exported symbols displayed by Dependency Walker was empty, and the said error message "The application was unable to start correctly" was displayed.
So it could be fixed by changing the output file name in the Visual Studio linker options.
You can have this if you are trying to manifest your application that it has a dependancy on the Microsoft.Windows.Common-Controls assembly. You do this when you want to load Version 6 of the common controls library - so that visual styles are applied to common controls.
You probably followed Microsoft's original documentation way back from Windows XP days, and added the following to your application's manifest:
<!-- Dependancy on Common Controls version 6 -->
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"/>
</dependentAssembly>
</dependency>
Windows XP is no longer the OS, and you're no longer a 32-bit application. In the intervening 17 years Microsoft updated their documentation; now it's time for you to update your manifest:
<!-- Dependancy on Common Controls version 6 -->
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"/>
</dependentAssembly>
</dependency>
Raymond Chen has a lovely history of the Common Controls:
The history of the Windows XP common controls (archive)
The main problem, of course, is that a DLL file is missing, or, even more likely, corrupt. If this is the case, then I have some pretty good ideas (especially if you've downloaded and installed a DLL manually!)...
TLDR: Delete every manually copy/pasted DLL you've done, uninstall old redistributable installs, and reinstall new redistributables for both 32-bit and 64-bit installs.
What To Do
This solution of copying/pasting missing DLL's into system32, etc., used to work since I can remember in the 1990's, but it doesn't seem to work anymore (2020). So if you run into this problem recently, I suggest:
Within windows\system32 and windows\SysWOW64, delete all files that match ms*.dll, that the operating system will allow you delete as admin.
Uninstall all Visual C++ Redistributables that you have with Windows. This prevents the "You already have this!" dialogue showing up upon reinstall, as detailed in the next step when we re-install.
Reinstall the 2015-2019 Visual C++ Redistributable from a regularly available download site. If this does not work, download and install the others, but personally, the 2015-2019 covered everything for me. Regardless of your machine, install both x32 and x64 packages! (All Download Links: Collected VC++ Download Links; MSVCR120.dll Fix; MFC140U.dll Fix.)
How You Know It's Working
There's a lot of variation in coders experiencing this, so, the idea that there's one single, possible solution is often discarded, but let's be positive!
If deleting the matching ms*.dll files worked, then you will no longer get an error about error code 0xc000007b. Instead, you'll get a message about a missing .dll. This tells you that you're hitting the right code path!
If installing the redistributable works, then certain popular, DLL files should appear in the above-mentioned system32 and SysWO64 folders. For instance: MSVCR120.dll, MSVCR140.dll, MSVCR100.dll, MSVCP100.dll, MSVCP120.dll, MSVCP140.dll, and friends.
Last, Possible Best Chances
Sometimes things don't work according to plan (as we all in the Windows world know). You can also try the following!
Open the "Turn Windows Features on or off" tab in Windows (supported in Windows 8-10). Uncheck the .NET Framework installations. You'll see a small installation go by.
Restart the system. Go to the above feature again, recheck .NET Framework, and click "okay". If this works, you'll see a "installing and updating .NET framework" message that takes maybe a minute or so to go by. Once this is done, I recommend a reboot again.
Good luck!
Just solved this problem for my personal project (thanks to Dries for that). For me it was because the project path was too long. After saving the .sln to a shorter path (C:/MyProjects) and compiling from there it ran without the error.
Also download and unzip "Dependencies" into same folder where you put the wget.exe from
http://gnuwin32.sourceforge.net/packages/wget.htm
You will then have some lib*.dll files as well as wget.exe in the same folder and it should work fine.
(I also answered here https://superuser.com/a/873531/146668 which I originally found.)
I just ran into this issue. I searched for "C++" under my "Apps & Features" in Windows 10 control panel and noticed that some kind of update had just run a few days prior and installed VC++ Redistributable 2012-2017. The app that was running into the error message only required VC++ 2010. I uninstalled all of them and then reinstalled just 2010 x86/x64, and the error went away and the application functioned as expected.
That can happen if for some reason a x86 resource is loaded from a x64 machine. To avoid that explicitly, add this preprocessor directive to stdafx.h (of course, in my example the problematic resource is Windows Common Controls DLL.
#if defined(_WIN64)
#pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df'\"")
#endif
It is possible that you have multiple versions of the dll(s) on your system. You can search your system to find out. The issue may be solved by simply changing the order of the directories in your path. This was my issue. (Cannot run Qt Creator GUI outside of Qt. "The application was unable to start correctly (0xc000007b)" error)
I ran into this issue when fetching code from my repository and compiling on a new machine. Copying over the entire repository and then compiling resulted in an executable which worked. Turns out a 32bit DLL accidentally wasn't checked in. As the people above state, use "Dependency Walker" to figure out where it goes wrong.
To make it more clear what to look for see the below screenshot, with in the background the exe trying to load the wrong DLL (notice the '64') resulting in "the application was unable to start correctly 0xc00007b" and in the foreground the exe which was simply copied over (which included the correct DLL).
I came here when I was searching for: "golang Windows (0xc00007b)"
I have an app written in Golang, which uses iconv. It worked on my machine, but not in someone else's machine.
The first error was the missing DLL: libiconv-2.dll, so I guess they downloaded it on the internet but it was the 32 bit and not 64 bit version, so the 0xc00007b error appeared.
I searched the DLL on my system but I did not have success until I searched on MinGW 64 path which in my case is: C:\msys64\mingw64\bin
The solution was to distribute the DLL with the .exe, which was in the MinGW folder.

What exactly is a "run-time"?

My company is always having problems with software not working because "run-times" or missing. I hear people say this a lot (you need the 32-bit run times, Microsoft run-times, etc etc).
What exactly is being referred to? DLL files? Something different? Can anyone please clarify?
Run-time is basically the time at which your code is running (as opposed to compile-time or link-time).
In the context you're seeing it, it means run-time libraries, those libraries needed to load an execute your program.
This is dynamically linked stuff (DLLs or shared objects) since statically linked code can't be missing (it's in the executable file itself).
A classic example is to depend on Microsoft's C run-time or .NET libraries but not ship them with your product. That means your executable will run on any machine that has those libraries already there (such as those with Visual Studio installed) but not necessarily every computer you want to run your code on.
I answered a question here regarding the difference between static and dynamic linking which should hopefully add to your knowledge. The dynamic linking allows you to update certain parts of the application without recompiling or relinking. You do this by dropping in a new version of the DLL. Unfortunately, having that code in a separate file means it can go missing.
That would be one cause of the problem but I suspect the most likely is just that someone didn't do their installation code very well, otherwise everything needed would have been installed.
A runtime in this context is a runtime library - a shared library (on Windows indeed a DLL), most commonly specifically referring to the one which provides basic functionality of the language. It implements the functions that are thought to be "built into" a language core. Thus, no program compiled with a compiler which requires a runtime library will run if such a library for it is not installed - or if the program is specifically statically linked (with everything needed packed into the executable).
To give you a practical example - here are some links to some common runtimes:
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) (x86 means 32-bit)
Microsoft Visual C++ 2010 Redistributable Package (x86)
Microsoft .NET Framework 4 (Web Installer)
These are system-wide installs - so any software that requires a particular runtime will be able to use it, once installed.
They are probably referring to Microsoft's 3rd party libraries and the .NET framework.
Your company's applications probably uses some 3rd party libraries such as MFC, ATL etc. in case of application's written in a .NET language e.g. C#, VB.NET, if you're developeing using Java there is a JRE (Java Runtime env) that have to be installed for the application to run.
If the required dlls/framework ween't installed/deployed on the customer's machine you'll probably get a "runtime error".
This is a deployment issue - which with the correct install process can be solved - e.g. the installer can check if the required framework is installed and if not install it as part of the installation process.

where does msscript.ocx gets installed from

I'm using msscript.ocx in my application which is an activex scripting host for windows.
Although I want to be able to use the same for XP embedded(XPe) which's highly customizable.
1.I want to know whether on XPe, msscript.ocx can be optionally installed or not?
2.Where does it get installed from, IE?
3.Or is it a windows core component which gets installed during the XPe setup?(I know one can unregister it, but can it be an optional installation)
Answering any or all of these questions will be of great help to me.
Thanks in advance.
Sam.
Microsoft's documentation of the MSScript.ocx library is somewhat contradictory on this issue. The short answer is, starting with Windows 2000, the MSScript.ocx library became part of the Windows OS. Subsequent service packs for Windows 2000, XP, and 2003 included bug fixes (1,2,3) for this library. Since that time, the library has remained part of the 32bit portion of Windows and is still included with Windows 7/2008 R2. Even 64bit versions of Windows still include msscript.ocx with WOW64 in C:\Windows\SysWOW64.
For a little history of this library's distribution keep reading.
Msscript.ocx was originally included on the Visual Studio 6 CD as a "optional" library - optional meaning it had to be manually installed. While the library was part of Visual Studio, it was migrated to being part of the Windows OS starting with Windows 2000.
This is where the confusion comes into play. Since msscript.ocx is considered to be a component of both VS6 and Windows 2000, updates were distributed in service packs for both. Even after the last service pack for VS6 was released, additional bug fixes needed to be distributed for older OS's, so a separate download was created specifically targeting Windows 95, 98 and NT4.
This download is targeted for older OS's for the simple fact that it had become a part of the OS in "modern" versions of Windows. If you are using Windows 2000 or greater, the download is unnecessary and - in my experience - can cause compatibility problems.
I think it is not shipped with Windows XP(not a 100% sure)...
But the best choice is to ship it with your installer(even if it was shipped, it can be removed). About the installing - you can put it where you want (in the program folder in Program Files is ok), the important thing is to register it.
The best choice for making installers - Wix
EDIT: reference
The Script control ships with Visual
Basic 6.0; however, Visual Basic 6.0
setup does not install the Script
Control for you. The control is
located in the CD directory
Common\Tools\VB\Script. To install the
script control, try the following
steps:
I think this answers your question....
For those having issues getting MSSCRIPT.OCX to work do the following:
Go to References in Project settings:
Microsoft Script Control 1.0
Microsoft Scripting Runtime
Microsoft Scriptlet Library
Check all those on.
you'llneed to change your development environment to produce a 32 bit version of your appliation, which for most apps won't matter.
For this goto Project,
then select Properties,
select Compile,
Target CPU: x86
In your code, and i'm using visual studio 2019,
' by using the references above the ScriptControl
' should become available for inclusion into your source c
Dim ms As ScriptControl = New ScriptControl
ms.Language = "JavaScript"
ms.Reset()
Try
ms.ExecuteStatement(RichTextBox1.Text)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Resources