title: Access is Denied loading a dll with ctypes on Vista
body: <p>I'm having issues with using ctypes.  I'm trying to get the following project running on Vista.</p>
  
  <p><a href="http://sourceforge.net/projects/fractalfrost/" rel="nofollow noreferrer">http://sourceforge.net/projects/fractalfrost/</a></p>
  
  <p>I've used the project before on Vista and had no problems.  I don't see any think changed in svn that cause this I'm thinking it's something local to this machine.  In fact I'm not able to load dll's with ctypes at all.</p>
  
  <pre><code>Bobby@Teresa-PC ~/fr0st-exe/fr0st/pyflam3/win32_dlls
  $ ls
  Flam4CUDA_LIB.dll cudart.dll glew32.dll libflam3.dll pthreadVC2.dll
  
  Bobby@Teresa-PC ~/fr0st-exe/fr0st/pyflam3/win32_dlls
  $ python
  Python 2.6.3 (r263rc1:75186, Oct 2 2009, 20:40:30) [MSC v.1500 32 bit (Intel)]
  on win32
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; from ctypes import *
  &gt;&gt;&gt; flam3_dll = CDLL('libflam3.dll')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "c:\Python26\lib\ctypes\__init__.py", line 353, in __init__
      self._handle = _dlopen(self._name, mode)
  WindowsError: [Error 5] Access is denied
  &gt;&gt;&gt; flam3_dll = CDLL('.\\libflam3.dll')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "c:\Python26\lib\ctypes\__init__.py", line 353, in __init__
      self._handle = _dlopen(self._name, mode)
  WindowsError: [Error 5] Access is denied
  &gt;&gt;&gt; import os
  &gt;&gt;&gt; flam3_dll = CDLL(os.path.abspath('libflam3.dll'))
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "c:\Python26\lib\ctypes\__init__.py", line 353, in __init__
      self._handle = _dlopen(self._name, mode)
  WindowsError: [Error 5] Access is denied
  &gt;&gt;&gt;
  </code></pre>
  
  <p>Any ideas what would be causing this and better yet someway around it?</p>