crispincooper

python+ctypes fails to find my dll

Discussion created by crispincooper on Aug 23, 2011
Latest reply on Aug 25, 2011 by crispincooper
Hi

I have a python script which calls a dll, a la http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001500000013000000.htm

It worked fine when the path to the dll was hardcoded:

ctypes.windll.LoadLibrary(u'c:\absolute\path\to\my.dll')

but now I'd like to distribute the dll to other people, I don't know the absolute path.  It will however be in the same folder as the python script.

But neither of these work:

ctypes.windll.LoadLibrary(u'my.dll')
ctypws.windll.my

...both return the error "The specified module could not be found".

Does anyone know how to solve this?

Thanks in advance!

Outcomes