title: .NET application referencing ActiveX components cause Access Violation Exception in Windows 10
body: <p>An application built with .NET uses ActiveX components from 2004. Specifically ComponentOne VSPDF and VSPRINTER version 8.</p>
  
  <p>These components are used in a DLL to generate a PDF and then send an email. This application has been working perfectly until Windows 10, where the application crashes. The message just says "PROGRAM has stopped working". The EventLog shows errors with the code c0000005 - "Access Violation Exception".</p>
  
  <p>We have tried the following:</p>
  
  <ol>
  <li><p>Added the program to DEP list - no effect.</p></li>
  <li><p>Installed redistributable file VS++ 2005 - no effect.</p></li>
  <li><p>Registered OCX files - no effect.</p></li>
  <li><p>Added the components directly to the .NET form - application no longer starts.</p></li>
  </ol>
  
  <p>I know, from searching the internet, that this error code means that the program is trying to access protected (or corrupted) memory. But then how does it work in Windows 7 and not in Windows 10?</p>
  
  <p>Some people are also saying that it is a security update. But then how do we work around it? We can't now go around uninstalling security updates on customers computers...</p>
  
  <p>We have narrowed it down to an environmental problem, but have no idea what to do next...</p>
  
  <p>Does anyone have some alternative advice?</p>