Attemting to Read or write protected memory RRS feed

  • Question

  • Hello,

    I am getting Memory violation exception as "Attempting to read or write proetcted memory:" when cal to unamanaged method(static liblibrary) has been mad from C++/CLI code. I m using VS 2010 IDE and .Net framework 4.0


    Thank you,



    Friday, May 21, 2010 10:51 AM


  • AV (AccessViolation) is mostly caused by native part of your application. Any mixed-mode DLL, COM interop or PInvoke is suspicious. Try to debug your application or create a small repro (10-20 lines of coce) for your problem and post it here.


    • Marked as answer by SamAgain Friday, May 28, 2010 4:20 AM
    Tuesday, May 25, 2010 10:05 AM