LibraryLoader loads wrong DLL
Thor Andreas Tangen <[email protected]> Wed, 14 Mar 2012 09:31:25 +0100
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <CA+wbTUojFy6jJFDdngC6DJ-9awXEXpw7S-veKwnALb+af179Sw@mail.gmail.com> |
Hi
I have a DLL, lets call it interface.dll, which wraps a C++ API. This
C++ API depends on another API located in console.dll. This
console.dll is shipped with the C++ API and is specific to this API,
i.e. the people who has made the API also made the console.dll. Both
the console.dll and the C++ API DLL is located in the same folder as
my interface.dll. But when using
ctypes.cdll.LoadLibrary("interface.dll") the loading fails. The error
reported is that a ceratin function cannot be found in the
console.dll. Using DependencyWalker to profile the loading of the
interface.dll I discovered that the LoadLibrary folder tries to load
console.dll found in C:\Windows\system32 instead of the console.dll
found in the same folder as interface.dll.
Is this the wanted behaviour? Is there a way I can "help" the
LibraryLoader to find the right DLL?
Thanks,
Thor Andreas
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/