[PyQt] PyQt4 'apparently' interfering with ctypes.cdll.LoadLibrary()
Peter Howard
peterhoward42 at blueyonder.co.uk
Wed Mar 12 01:14:15 GMT 2008
Context:
Windows XP
PyQt version from: PyQt-Py2.5-gpl-4.3.3-2.exe
Python from: python-2.5.1.msi
Fluid Synthesisor dll from:
http://download.savannah.gnu.org/releases/fluid/fluidsynth-1.0.3-win32.zip
I seem to be getting an interaction / coexistence problem with the
following:
ctypes.cdll.LoadLibrary()
PyQt4
The dll cited above.
This works fine:
import ctypes
ctypes.cdll.LoadLibrary('libfluidsynth-1.dll')
(the dll is in the same folder as the python script)
This doesn't
import PyQt4.QtCore
import ctypes
ctypes.cdll.LoadLibrary('libfluidsynth-1.dll')
... producing:
Traceback (most recent call last):
File
"C:\pch\swdev\PetesPiano\SVN-project\src\sandpit\CtypesPyQt4Problem.py",
line 3, in <module>
ctypes.cdll.LoadLibrary('libfluidsynth-1.dll')
File "C:\Python25\Lib\ctypes\__init__.py", line 423, in LoadLibrary
return self._dlltype(name)
File "C:\Python25\Lib\ctypes\__init__.py", line 340, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 998] Invalid access to memory location
If you try a well known and 'respectable' dll instead like 'msvcrt' it works
ok.
Any ideas?
Thanks in anticipation.
Pete
More information about the PyQt
mailing list