"Gordon McMillan" <gmcm@hypernet.com> writes:
As a matter of python-ethics, I think it's risque to even put
pyd's in a package directory, (it's certainly not something that
Guido planned for). I'm surprised it even works to put a
(regular) dll there - is this one of VC 6 's advanced dynamic
linking features? (I haven't been following MS very closely for
awhile.)
I don't know how long it's been, but having the system locate a DLL in
the same directory as the module trying to load it is something I've
been used to for a while. The following snippet of MSDN info on the
LoadLibrary() call may help explain it.
"""
(...) When no path is specified, the function searches for loaded
modules whose base name matches the base name of the module to be
loaded. If the name matches, the load succeeds. Otherwise, the
function searches for the file in the following sequence:
* The directory from which the application loaded.
* The current directory.
* Windows 95/98: The Windows system directory. Use the
GetSystemDirectory function to get the path of this directory.
* Windows NT/ 2000: The 32-bit Windows system directory. Use the
GetSystemDirectory function to get the path of this directory. The
name of this directory is SYSTEM32.
* Windows NT/ 2000: The 16-bit Windows system directory. There is no
function that obtains the path of this directory, but it is
searched. The name of this directory is SYSTEM.
* The Windows directory. Use the GetWindowsDirectory function to get
the path of this directory.
* The directories that are listed in the PATH environment variable.
The first directory searched is the one directory containing the image
file used to create the calling process (for more information, see the
CreateProcess function). Doing this allows private dynamic-link
library (DLL) files associated with a process to be found without
adding the process's installed directory to the PATH environment
variable.
Windows 2000: If a path is specified and there is a redirection file
for the application, the function searches for the module in the
application's directory. If the module exists in the application's
directory, the LoadLibrary function ignores the specified path and
loads the module from the application's directory. If the module does
not exist in the application's directory, LoadLibrary loads the module
from the specified directory.
"""
The one place you can get caught (this was one of the places 2000 made
some changes) is if you have an already loaded module with the same
basename - in that case the new load will attach to that module
regardless of the directory it was originally located in.
···
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l@fitlinxx.com /
> FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users