summaryrefslogtreecommitdiffstats
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-08 01:44:41 (GMT)
committerGuido van Rossum <guido@python.org>1998-10-08 01:44:41 (GMT)
commit0f8b30f8ce795c62b81ad5a922c8c3f232e7784a (patch)
tree3ff957b2bb088e414c5ed1b8ef9f5de237454d25 /Python/importdl.c
parent2a570049acf2789bfbe2d907a188895249f17b62 (diff)
downloadcpython-0f8b30f8ce795c62b81ad5a922c8c3f232e7784a.zip
cpython-0f8b30f8ce795c62b81ad5a922c8c3f232e7784a.tar.gz
cpython-0f8b30f8ce795c62b81ad5a922c8c3f232e7784a.tar.bz2
On Win32, use
LoadLibraryEx(pathname, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) to search dependent DLLs in the directory of the pathname.
Diffstat (limited to 'Python/importdl.c')
-rw-r--r--Python/importdl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/importdl.c b/Python/importdl.c
index c7a4812..8238556 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -493,7 +493,10 @@ _PyImport_LoadDynamicModule(name, pathname, fp)
sprintf(p, ".\\%-.255s", pathname);
pathname = pathbuf;
}
- hDLL = LoadLibrary(pathname);
+ /* Look for dependent DLLs in directory of pathname first */
+ /* XXX This call doesn't exist in Windows CE */
+ hDLL = LoadLibraryEx(pathname, NULL,
+ LOAD_WITH_ALTERED_SEARCH_PATH);
if (hDLL==NULL){
char errBuf[256];
unsigned int errorCode;