Run time error in VS2010 MFC Application RRS feed

  • Question

  • HI Hi All,

    When i run my application ( VS2010 MFC Application), i am getting  runtime error message.

    i don't know what a problem, please took at error message, please provide a solution.


    Esha abdullah M

    Thursday, September 8, 2011 2:57 PM


  • The error message is fairly clear.  At least one of your files (if not your whole project) is set to compile with /clr.  You're using a .NET type in a native construtor or inside of DllMain, which is not allowed.


    Try running this under a debugger - it should give you more of a clue as to where the problem is occurring.  You'll need to change the .NET code to use MFC or Windows API calls, instead.

    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    • Proposed as answer by RohitArora Friday, September 9, 2011 6:48 AM
    • Marked as answer by Min Zhu Wednesday, September 14, 2011 3:03 AM
    Thursday, September 8, 2011 4:28 PM