[issue43022] Unable to dynamically load functions from python3.dll

Eryk Sun report at bugs.python.org
Mon Jan 25 14:36:42 EST 2021


Eryk Sun <eryksun at gmail.com> added the comment:

I noted that the path to "python3.dll" must be fully qualified. But let me stress that point. You cannot use the relative path "path/to/python3.dll" with LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR. The loader will fail the call as an invalid parameter.

Unlike POSIX, a Windows path that contains slashes may be handled as a relative path in search contexts, if it lacks a drive or leading slash. In the case of LoadLibraryW(L"path/to/python3.dll"), the loader will try to resolve "path/to/python3.dll" against every directory in the DLL search path, which may not even include the current working directory.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43022>
_______________________________________


More information about the Python-bugs-list mailing list