Community discussion forum

How to solve System.AccessViolation: Attempted to read or write protected memory?

  • 1 month ago

    I have a dll file written in C++. There is a public static function that accessing a private static variable. And in C#, I have created a wrapper to call this static function.

    However, when calling this function in the C# application, I got the System.AccessViolation:Attempted to read or write protected memory.

    Any suggestion is appreciated.

    Best regards George

    Post was edited on 12/10/2009 19:24:55 Report abuse

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback