title: Ctypes: [WinError 126] Cant find DLL
body: <p>I know there are a lot of threads about the WinError 126 and so on. But I really need help...</p>
  
  <p>I have a directory like this:</p>
  
  <ul>
  <li>mytestscript.py</li>
  <li>my32bit.dll</li>
  <li>my64bit.dll</li>
  </ul>
  
  <p>I have a 32 Bit and a 64 Bit Python Interpreter installed.
  Now if I run mytestscript.py with a 32 Bit Interpreter, everything works fine.</p>
  
  <pre><code>import ctypes
  dll = ctypes.windll.LoadLibrary("my32bit.dll")
  print(dll)
  </code></pre>
  
  <p>But if i run it with a 64 Bit Interpreter</p>
  
  <pre><code>import ctypes
  dll = ctypes.windll.LoadLibrary("my64bit.dll")
  print(dll)
  </code></pre>
  
  <p>I get the follwoing error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Heinzeri/Desktop/TEMPY/mytestscript.py", line 4, in &lt;module&gt;
      dll = ctypes.windll.LoadLibrary("my64bit.dll")
    File "C:\Program Files\Python37-64\Lib\ctypes\__init__.py", line 434, in LoadLibrary
      return self._dlltype(name)
    File "C:\Program Files\Python37-64\Lib\ctypes\__init__.py", line 356, in __init__
      self._handle = _dlopen(self._name, mode)
  OSError: [Error 126] The specified module could not be found
  </code></pre>
  
  <p>What could be the cause that the 64-Bit Python doesn't find the DLL?
  Do I have to add it to PATH / PYTHONPATH?
  Do I need some Microsoft Redistributable?</p>
  
  <p>The DLL's are checked 64bit and 32bit and come from a vendor.</p>