title: C# Dll import not working with some computers
body: <p>I have a C++ dll compiled using VS2013.</p>
  
  <p>I call it in my C# application like this :</p>
  
  <pre><code>[DllImport("myDLL.dll", EntryPoint = "RestartIfNecessary", CallingConvention = CallingConvention.Cdecl)]
          public static extern bool RestartIfNecessary(uint uiAppId);
  </code></pre>
  
  <p>And it works fine.</p>
  
  <p>However once the application is in prod some users have the following error :
  Unable to load DLL &apos;myDLL.dll&apos;: The specified module could not be found. (Exception from HRESULT: 0x8007007E)</p>
  
  <p>I can't find why this error happens on some computers. We've been able to fix the issue for some users by removing  Microsoft Visual C++ 2013 Redistributable (x86) and (x64) and installing them again.</p>
  
  <p>My C# application is compiled to run on x86.
  I have a 64bits w10 and it works fine, so I don't know if it's related to windows.</p>
  
  <p>Have you any hint to help me fixing this issue ?</p>
  
  <p>EDIT: Here are the results of dependency walker :</p>
  
  <p><a href="https://i.stack.imgur.com/odL9n.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/odL9n.jpg" alt="enter image description here"></a></p>
  
  <p>In dependendy walker I've found 3 dll in red, I don't know if they are important:
  <a href="https://i.stack.imgur.com/DUaed.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DUaed.jpg" alt="enter image description here"></a></p>
  
  <p>API.dll is a third party dll (myDLL is a wrapper for this API)</p>