We use a python script to run a camera as part of an experiment. In practice, the python script uses ctypes
to load a dll and this is what is used to access the camera functionality. We recently upgraded to a Windows 10 computer, and I now no longer seem to be able to load the dll.
A stripped down version of the relevant script as follows:
PARENT_DIR = os.path.dirname(os.path.realpath(__file__))
os.add_dll_directory(PARENT_DIR)
x = ct_util.find_library('picam_64bit')
self.picam = ct.WinDLL(x)
On the fourth line, the following error is returned:
[WinError 127] The specified procedure could not be found
A few further notes:
- The camera works with the manufacturer-supplied executable.
- The code was originally written in Python 2.7 and has been migrated to Python 3.8. The same error occurs in both.
- This question is clearly relevant. I have made sure that only one version of Python is installed at a time (right now, 3.8), and there is only one version of the dll on the computer.
- The third line returns a sensible value, so Python can clearly `see' the DLL, just not load it.