[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

Eryk Sun report at bugs.python.org
Mon Apr 13 08:02:10 EDT 2020


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

> But I'm not sure why that is getting loaded earlier than the 
> current directory. Is that the behaviour we went for here?

I don't understand what's going on here if %PATH% is interfering. The current directory (%__CD__%) should be checked before %PATH% with the standard DLL search order for desktop applcations. That's what I've observed in practice and how it's documented [1]:

    SafeDllSearchMode enabled:

    1. %__APPDIR__%
    2. %SystemRoot%\System32
    3. %SystemRoot%\System
    4. %SystemRoot%
    5. %__CD__%
    6. %PATH%

    SafeDllSearchMode disabled:

    1. %__APPDIR__%
    2. %__CD__%
    3. %SystemRoot%\System32
    4. %SystemRoot%\System
    5. %SystemRoot%
    6. %PATH%

[1]: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order#search-order-for-desktop-applications

----------

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


More information about the Python-bugs-list mailing list