ctypes error

Gib Bogle g.bogle at auckland.no.spam.ac.nz
Fri Jan 15 01:34:54 EST 2010


I have a simple demo program (on Windows XP) that uses the ctypes module to load 
a DLL.  This program works as expected with Python 2.5.4, but fails with Python 
2.6.4 (on a different machine, each machine has only one Python version 
installed), with these messages:

File "demo.py", line 37, in <module>
   mydll = windll.LoadLibrary("DEMO.DLL")
File "c:\python26\lib\ctypes\__init__.py, line 431, in LoadLibrary
   return self._dlltype(name)
File "c:\python26\lib\ctypes\__init__.py, line 353, in __init__
   self._handle = _dlopen(self._name, mode)
WindowsError: [Error 14001] This application has failed to start because the 
application configuration is incorrect.  Reinstalling the application may fix 
this problem

It isn't clear to me what the "application" is.  As far as I know I didn't 
install anything except Python 2.6.4.  Is it possible that ctypes doesn't work 
with 2.6.4?



More information about the Python-list mailing list