1
ctypes 사용에 문제가 있습니다. Vista에서 다음 프로젝트를 실행하려고합니다.Vista에서 ctypes로 dll을로드 할 때 액세스가 거부되었습니다.
http://sourceforge.net/projects/fractalfrost/
내가 Vista에서 이전 프로젝트를 사용하고 아무런 문제가 없었습니다. svn에서 어떤 생각이 바뀌지는 않는다는 것을 알았지 만,이 기계에 국한된 일이라고 생각하고 있습니다. 사실 나는 ctypes로 dll을로드 할 수 없습니다.
[email protected] ~/fr0st-exe/fr0st/pyflam3/win32_dlls
$ ls
Flam4CUDA_LIB.dll cudart.dll glew32.dll libflam3.dll pthreadVC2.dll
[email protected] ~/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.
>>> from ctypes import *
>>> flam3_dll = CDLL('libflam3.dll')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\Python26\lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 5] Access is denied
>>> flam3_dll = CDLL('.\\libflam3.dll')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\Python26\lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 5] Access is denied
>>> import os
>>> flam3_dll = CDLL(os.path.abspath('libflam3.dll'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\Python26\lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 5] Access is denied
>>>
어떤 아이디어가 원인일까요?
그리고 정확히 그랬습니다. – null