title: How to find a dll with Python
body: <p>I have some code that is supposed to load a .dll. I'm using Python version 3.0.17114.1 with Visual Studio 2017 Preview. Here is a code snip:</p>
  
  <pre><code>from ctypes.util import find_library
  theDll = find_library('DsiLibrary_dll')
  </code></pre>
  
  <p>theDll comes out "None" which means it can't be found.</p>
  
  <p>Note that a google search said that I should not add .dll:</p>
  
  <pre><code>#from "https://docs.python.org/3/library/ctypes.html"
  #name is the library name without any prefix like lib, suffix like .so, .dylib
  </code></pre>
  
  <p>I checked SO and in one example a guy did use .dll. So I have tried adding .dll but no help. Then I  also tried using cdll.find_library but that doesn't work either.</p>
  
  <p>So I added this to be sure the .dll is there:</p>
  
  <pre><code>print ("Current directory:")
  os.system("cd")
  os.system("dir /s/b DsiLibrary_dll.dll")
  </code></pre>
  
  <p>The output is this:</p>
  
  <pre><code>Current directory:
  L:\DSI (His) Try 5\Windows Apps\PythonSample
  L:\DSI (His) Try 5\Windows Apps\PythonSample\DsiLibrary_dll.dll
  </code></pre>
  
  <p>Which shows that the dll is there.</p>
  
  <p>I'm new at Python but I'm hoping someone can help here.</p>