title: Attempted to read or write protected memory. When I call showDialog method of openfileDialog
body: <p>recently in my project when I call <code>ShowDialog</code> method of <code>OpenFileDialog</code> I get this error:</p>
  
  <p>"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."</p>
  
  <p>I have been searching all over the web before now but my problem did not solve.
  Also I installed microsoft patch, but because my project is in .Net 3.5, it was not useful.</p>
  
  <p>Code Sample:</p>
  
  <pre><code>OpenFileDialog OFD = new OpenFileDialog(); 
  OFD.ShowDialog();
  </code></pre>
  
  <p>Thanks for any help.</p>