Hello every one!
My problem is very confusing.
When I mix managed and unmanaged C++ code together and build an assembly using /clr or /clr: pure modes, it works fine I mean run fine for a while and when I run it again it eventually stops working and gives this error message...
The application failed to initialize properly (0xc000007b). Pleasae click OK to terminate.
This problem is not only with my mixed mode assemblies but also with SDK .NET tools such as Resource Locater. This problem is not with /clr:safe mode assemblies and also not with VB.NET and C# IL assemblies.
Can some body please help me to fix this error.
Mixed Mode Assemblies (0xc000007b) Failed to Initialize Error
Started by Shahid@programming, Jul 18 2011 07:23 PM
12 replies to this topic
#1
Posted 18 July 2011 - 07:23 PM
|
|
|
#2
Posted 21 July 2011 - 05:54 PM
#3
Posted 23 July 2011 - 07:29 AM
Did you not hear about C++ Interop?
I am mixing native and managed code and this is called C++ Interop.
I am mixing native and managed code and this is called C++ Interop.
#4
Posted 23 July 2011 - 08:42 AM
Okay, but to me it seems like bad practice, as it can introduce a lot of errors. Is there any particular reason why you have to mix the two?
sudo rm -rf /
#5
Posted 23 July 2011 - 09:15 AM
Suppose I have a great work in native C++ code, and now I want to bring most of that effort to .NET platform but I does not want to do this hard work again for .NET framework, there is only option left, to compile native C++ source code using /clr: pure or /clr compilation modes. This will save great time and enable native code execution via CLR.
#6
Posted 23 July 2011 - 09:43 AM
Okay, that makes sense. Error 0xc000007b means that the executable is corrupt. Can you show us all the options you're passing to the compiler and linker?
sudo rm -rf /
#7
Posted 24 July 2011 - 09:25 AM
I have an x86 machine, WindowsXP SP3. I compile the code passing this information...
When my source code file contains both native and managed code.
cl.exe /clr MyProgram.cppor
cl.exe /clr:pure MyProgram.cpp
When my source code file contains both native and managed code.
#8
Posted 24 July 2011 - 10:11 AM
Hm. Are you compiling it by hand? Visual Studio passes a lot more arguments than that that it doesn't tell you about. It might be one of those that you're missing that's causing the problem.
sudo rm -rf /
#9
Posted 24 July 2011 - 05:24 PM
dargueta said:
Hm. Are you compiling it by hand? Visual Studio passes a lot more arguments than that that it doesn't tell you about. It might be one of those that you're missing that's causing the problem.
This problem exists when I compile on the command line and when I compile via the Visual Studio too. Remember that when I run the compiled program once it runs fine means without any error message. This error happens on the second or 3rd try.
#10
Posted 24 July 2011 - 10:56 PM
#11
Posted 25 July 2011 - 07:16 AM
dargueta said:
Weird...maybe it's a registry key getting set?
#12
Posted 25 July 2011 - 04:15 PM
Why don't you use MSVS Express 2010? Here's a tutorial on how to publish. I'm not 100% sure if it holds for 2008 as well.
sudo rm -rf /
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









