title: Access Violation Exception
body: <p>I am having some strange problem. I have written a small module in VC++ using OpenCV. </p>
  
  <p>It works fine. The code aggregates feed from the CCTV camera connected to the USB port.</p>
  
  <p>however, I had to write the rest of my application in C#, so I made a DLL of the VC++ code and called the VC++ method from C#.</p>
  
  <p>Now, I have ended up getting an error</p>
  
  <pre><code>Attempted to read or write protected memory. 
  This is often an indication that other memory is corrupt.
  </code></pre>
  
  <p>Can anyone please suggest me any solution to this. Is there any Access Violation while accessing it in a managed code?</p>