"Unable to start correctly (0xc0150002)" error on Windows Server 2008 R2 x64 - c++

I am unable to launch my application on Windows Server 2008 R2 x64. It was built via Visual Studio 2013 (toolset -- v120_xp, static linkage with CRT). On other systems (for example, Windows 8 x64 and Windows 7 x64) application works as expected, while on Windows Server 2008 R2 x64 it gives me the following error:
When I try to run this application via WinDbg it shows this error right after the following line:
ModLoad: 00000000007b0000 000000000094a000
C:\Users\Administrator\Desktop\app\LIBEAY32.dll
I've tried to download x64 OpenSSL binaries and replace the "libeay32.dll" and "ssleay32.dll" files in the application's directory, but it gives me the same error.
Yes, there are a lot of questions about similar errors, but unfortunately I didn't find any answer for my case.
What am I doing wrong? How can I fix it?
Thanks in advance.

Related

Compiling code for Win32 applications - Windows XP and Windows Server 2003 R2

I'm on a Windows 10 computer trying to compile some C++ code with Visual Studio 2013, but I cannot get the code to run on a Windows 2003 R2 Server, and I'm unsure why.
I tried compiling with the XP flag, and I have OpenSSL and VCRedist x86 2005 - 2019 installed on the server.
My project is located at https://github.com/erfg12/EQClassic The world.exe and zone.exe work on Win2k3 server just fine, but it's the login.exe that says, "This is not a valid win32 application". To compile the code simply grab the Dependencies from https://drive.google.com/file/d/0B4YtK9YXaHvQbU93Z25kY2J4WWM/view?usp=sharing and place them into the Dependencies folder and press compile in Visual Studio.
If anyone could get Login.exe to work on a Windows 2003 server or a Windows XP desktop computer that's exactly what I need. Thank you.

VS2015 : The application was unable to start correctly (0xc000007b)

I wrote a code on Visual studio 2015 for a windows 10 PC. The application is mainly focused on UDP communication and I use the boost libraries.
It works perfectly but when I move the folder of the code to Windows 7 I receive the error "The application was unable to start correctly (0xc000007b)". I tried also in Windows 8.1 and after rebuilding the libraries it works.
What I noticed is that when I receive the error it does not load the .dll that in the other versions it loads.
May it be a problem with the boost?
Have you ever experienced it?
0xc000007b is error when you try to use x64 dlls in x32 application or other way around, so you probably copied wrong dlls. Rebuild fixed this, as it prepared new dlls.
win7_64 visual studio 2015, 0xc000007b
When I was programming C++ code in the visual studio 2015, it threw the error:0x000007b, and I have tried three kinds of solutions;
1.Installing Direct X
2.Installing VC C++ 2015 libraries
3.Making sure the DLL is consistent with the OS(and I think this is relevant to my problem)
ANd my solution will show below:
enter image description here
and I changed the [[[Debug]]] into [[[X64]]], then, it works, I believe that because some dlls are not consistent with the platform, so if I changed the Debug platform, We will get the correct result.The prerequisite:must having installed all dlls under the X64 system.

Can't debug using VS2005 on Win7/64 box

I've got an 32-bit C++ app, "MyOldApp" built with VS2005. I recently changed my dev PC from a WinXP box to a Win7/64 one. On it I installed VS2005,VS2008,VS2010 and VS2012 (in that order).
Then I found I could not launch "MyOldApp" inside VS2005 in the Debug configuation (Release works fine). Error: Unable to start program. This application has failed to start because the application configuration is correct." Windows event log says: Activation context generation failed for "MyOldApp.exe". Dependent Assembly Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762" could not be found. Please use sxstrace.exe for detailed diagnosis.
I check the manifest and it confirms this dependency.
So I check C:\Windows\winsxs and find this directory: x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.42_none_ef74ff32550b5bf0
Then I check VS2005 Help > About, find it at 8.0.50727.42 and realize I never installed SP1 which I must have been using on the XP box. So I set out to update my machine from .42 to .762 but fail. I have tried installing it from here:
Visual C++ 2005 Sp1 Runtime (x86)
and from here:
Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Update
While installing, I get and agree to the license agreement, then see the "preparing to install" dialog. Then the installer just silently exits, and I am left with version .42 and my original problem.
How do I get SP1 to install? Thanks.
Found this:
Microsoft® Visual Studio® 2005 Team Suite Service Pack 1
and it was kind enough to run to completion. Launched VS2005 and it told me to do another update, which I found here:
Visual Studio 2005 Service Pack 1 Update for Windows Vista
which also ran to completion. VS2005 Help about now shows version .762 and my app can be run in Debug Configuration.

C++ app built on Windows 7 (using VS2010 IDE and VS2008 toolset) runs on Windows 7, but not on Win XP

I have a C++ application, which is built on Windows 7 using VS 2010 IDE against VS2008 toolset. I have verified that it depends on msvc*90.dll.
The problem occurs when i move it to XP professional SP3 machine. I have installed the 32-bit vs 2008 redistributable package too.
However, the application fails to run. No error is reported. Nothing is logged into system even viewer as well.
Any hints?
PS: I have seen the following threads already.
Program Built on Win7 won't run on WinXP
How do I compile for windows XP under windows 7 / visual studio 2008
Have you checked the DLL in that Windows XP system with Dependency Walker. This may help you find if you are not missing another dependency or not dealing with side by side execution problems.
This issue is resolved now. The problem was not related to dependencies. Instead, it was some directory not existing in the file system.

Why does my Application not run using the x64 Version of Windows Server 2008?

I have a Win32 C++ Application using a handful of third-Party DLLs that is installed at some hundred costumer machines. I recently tested the x86 Version of the installation successfully on Windows XP, Windows Vista x64, Windows 7 x86 as well as Windows Server 2008 x86. No Problems. The Installer (nullsoft) installs the redistributable files for VC 2005 and VC 2008 as both are required by different DLLs we use.
But with Windows Server 2008 x64 both, the x86 and the x64 Versions refuse to start.
When i start the x86 Version of the program a Dialog appears:
<myApp> has stopped Working.
The EventLog contains a message:
Faulting application myapp.exe, version 1.0.0.0, time stamp 0x4bcb37ca,
faulting module MSVCR80.dll, version 8.0.50727.4053, time stamp 0x4a594c79,
exception code 0xc000000d, fault offset 0x0001ce0b, process id 0x29c,
application start time 0x01cb0329976cfc68.
\Windows\winsxs contains a directory
x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d
Using sxstrace (first trace, then parse) a log file of 3 Bytes length is created containing non readable characters. Behavior of the x64 Version is similar. Also all demo programms from the 3rd Party Dlls are working properly. Any hint ?
It doesn't look like a side-by-side error. The exception code is STATUS_INVALID_PARAMETER, "An invalid parameter was passed to a service or function." That doesn't help. You'll need a debugger, probably with the Windows debugging symbols. Make it stop on the first-chance exception.