C# application not running with exit code -1073740791 (0xc0000409)

3

I have created a C# application, having 3 projects:

  1. C# project [startup]
  2. CLI project
  3. Native C++ project [with VC90 compiler (Visual Studio 2008)]

Here, I have a simple class in C++ project which I am exporting and calling a very simple method of this class from CLI project.

The code builds fine, but once I try to run it, it exits with the following output messages:

The program '[6088] VS2012_ConsoleApp.exe: Native' has exited with code -1073740791 (0xc0000409). The program '[6088] VS2012_ConsoleApp.exe: Managed (v4.0.30319)' has exited with code -1073740791 (0xc0000409).

It works fine if I am creating a class object in the heap. The error is coming if I create static object instance.

// WORKING CODE [Object creation on heap]   
    NativeClass* cls = new NativeClass();
    int returnVal = cls->Add(A, B);


// This code is not working
    NativeClass cls;
    int returnVal = cls.Add(A, B);
    return returnVal;
c#
c++
asked on Stack Overflow Dec 19, 2012 by Kumar Vikas Singh • edited Dec 19, 2012 by jonsca

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0