dll in project?

Alex Hall mehgcap at gmail.com
Mon Mar 15 09:24:01 EDT 2010


Okay, I got a new copy and all seems well now. The dll is found and
loaded. The functions inside the dll are not working, but that is not
Python's fault. Thanks to everyone for your help and suggestions!

On 3/15/10, Ulrich Eckhardt <eckhardt at satorlaser.com> wrote:
> Alex Hall wrote:
>> On 3/15/10, Ulrich Eckhardt <eckhardt at satorlaser.com> wrote:
>>> Alex Hall wrote:
>>>> I have a dll I am trying to use, but I get a Windows error 126, "the
>>>> specified module could not be found". Here is the code segment:
>>>> nvdaController=ctypes.windll.LoadLibrary("nvdaControllerClient32.dll")
>>>
>>> In addition to Alf's answer, this can also happen when the OS can't find
>>> another DLL that this one depends on.
>
> Did you check if this could be the case?
>
>> Well, os.getcwd() returns "c:\python26", not my program's directory.
>> However, I changed the reference to the dll to be
>> helpers.progdir+'\\nvdaControllerClient32.dll'
>> and still no luck!
>
> Generally, there is os.path.join() IIRC which does this portably. This
> probably doesn't matter though. What I would check is firstly if this file
> could be opened at all, e.g. using os.stat().
>
>> helpers.progdir is a var holding the top-level directory of my
>> project, using os.path.
>
> Huh? In what way using os.path?
>
>> Again, using this more precise reference still fails, triggering my
>> except statement in my try/catch loop.
>
> Same error? See my initial guess! As a tool for finding out if there are
> missing dependencies, take a look at http://dependencywalker.com
>
> BTW: No need to CC me, I read your initial request here, I can ready any
> follow-ups here, too. ;)
>
> Uli
>
> --
> Sator Laser GmbH
> Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
Have a great day,
Alex (msg sent from GMail website)
mehgcap at gmail.com; http://www.facebook.com/mehgcap



More information about the Python-list mailing list