title: How to solve 'Attempted to read or write protected memory......' error with programmatic approach for WebBrowser component?
body: <p>I have a windows application which uses a form containing WebBrowser component. I never found this error message in the navigate method of it, till OS Vista. But it only shows up for OS Windows 7. </p>
  
  <p>Yes, solutions -
  1) At post build -
  call "$(DevEnvDir)....\VC\bin\vcvars32.bat"
  call "$(DevEnvDir)....\VC\bin\editbin.exe" /NXCOMPAT:NO "$(TargetPath)"</p>
  
  <p>2) editbin.exe /NXCOMPAT:NO YourProgram.exe</p>
  
  <p>works for me, but I need a programmatic approach. If any one can help me about it. Thanks in advance... :).</p>