The application failed to initialize properly (0xc0000034)

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have recompiled under Visual Studio 8 (on a Pentium 4 running XP) an application originally compiled under Visual C++ 6.0.  The program generates several security warnings because the original program used strcpy(), sprintf(), and others from string.h, but there are no errors.  

In the debug configuration, the program starts normally, and appears operative.  

In Release configuration, I get the error: "The application failed to initialize properly (0xc0000034)."

Having searched the MSDN forum, I am aware this error may occur because the required DLLs (particularly msvcrt.dll) cannot be found.  So, I used Dependency Walker on the executable to reveal all dependencies and to ensure that all DLLs required are in the path.  According to Dependency Walker, they are accessible.  (I have added mfc90.dll, msvcr90.dll to the release folder, and Ive tried adding msvcrt.dll from system32 into the Release folder.  Ive also tried execution of the program without copying msvcrt.dll from system32 -- no change in behavior).  Apparently mfc90.dll comes in different varieties for different architectures (x86, amd, etc.)  I have made sure Im using the x86 version.

Another possible stumbling block Ive seen that can exhibit this error, is having an ASSERT argument that is supposed to be part of the executable code instead of just a simple test condition.  This too I have checked.  While there are 3 ASSERTS in the code, they are all simple pointer checks with no side effects, so nothing bad should be occuring if the Release version doesnt compile them.

The program is a simple Dialog Box with a timed splash dialog on startup, and pretty much garden variety controls; (a tab control with a couple icons, edit boxes, static strings, combo boxes, etc...).  Aside from adding lines to invoke MessageBox() at various points Im not sure what to do.  Since this error gives me the feeling Im looking at a DLL related issue, Im not sure MessageBox() calls will get invoked before the error anyway...

Any suggestions would be greatly appreciated...

Mike

View the full article
 
Back
Top