title: EmguCV cvextern System.DllNotFoundException
body: <p>I am trying to run the example of LicensePlateRecognition in EmguCV 3.1. But I always get the error System.DllNotFoundException and the message is that "cvextern.dll cannot be loaded". I am running Windows 7 with Visual Studio 2013 (the computer is provided by my company).</p>
  
  <p>I copied the said dll and some other dlls in the folder to the debug folder (the profile is set to debug mode, and I tried both x86 and x64 versions). After getting the error again and again I started to suspect that it's because of my video card driver (some Google results suggested so). I updated that and the error persisted.</p>
  
  <p>After some more Googling, I found the Dependency Walker. One file "IEShims.dll" is missing. I downloaded that and put it into the debug folder with no luck.</p>
  
  <p>Some output I think might be relevant.</p>
  
  <blockquote>
    <p>Loading open cv binary from C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64</p>
    
    <p>LoadLibraryEx C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\opencv_ffmpeg310_64.dll failed with error code 87: The parameter is incorrect.</p>
    
    <p>File C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\opencv_ffmpeg310_64.dll cannot be loaded.</p>
    
    <p>LoadLibraryEx C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\cvextern.dll failed with error code 87: The parameter is incorrect.</p>
    
    <p>File C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\cvextern.dll cannot be loaded.</p>
  </blockquote>
  
  <p>Does anyone know what's wrong with that?</p>
  
  <p>The error seems to be stemmed from</p>
  
  <pre><code>#if !UNITY_IPHONE
       //Use the custom error handler
       RedirectError(CvErrorHandlerThrowException, IntPtr.Zero, IntPtr.Zero);
  #endif
  </code></pre>
  
  <p>Which is in the method</p>
  
  <pre><code>  /// &lt;summary&gt;
    /// Attempts to load opencv modules from the specific location
    /// &lt;/summary&gt;
    /// &lt;param name="modules"&gt;The names of opencv modules. e.g. "opencv_cxcore.dll" on windows.&lt;/param&gt;
    /// &lt;returns&gt;True if all the modules has been loaded successfully&lt;/returns&gt;
    public static bool DefaultLoadUnmanagedModules(String[] modules)
  </code></pre>
  
  <p>I tried a whole day to find the solution but I really don't know what I can do now. Any help is appreciated.</p>
  
  <p>EDIT: I also tried TlbImp with no luck.</p>
  
  <blockquote>
    <p>TlbImp : error TI1002 : The input file 'D:\Resources\cvextern.dll' is not a valid type library.</p>
  </blockquote>