title: Unable to load DLL ' mydll.dll': The specified module could not be found
body: <p>On my laptop, where I am developing the WPF application, everything works fine, debug and launch the .exe app. </p>
  
  <p>My app uses a native DLL, for resolve the reference problem I add the DLL in bin/debug (release) folder. I access it using DllImport like this:</p>
  
  <pre><code>[DllImport("xptodll.dll", CallingConvention = CallingConvention.Cdecl)]
  public static extern int LDA_About();
  </code></pre>
  
  <p>The problem is when I try to run the .exe app on another PC, when I need to access the DLL it crashes. I make a handle to log any unhandled exceptions and the following error appears:</p>
  
  <blockquote>
    <p>Unable to load DLL ' xptodll.dll': The specified module could not be
    found. Exception from HRESULT: 0x8007007E)</p>
  </blockquote>
  
  <p>The bin/debug directory has xptodll.dll, and app files: .exe, .application, .exe.config, .exe.manifest, .pdb.</p>
  
  <p>Maybe this is important, the xptodll.dll interacts with hardware, but why wouldn´t it have the same behaviour on both machines?</p>