[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2021-02-25 Thread Paul Moore
Paul Moore added the comment: No, because I want to work with whatever version of Python the user puts there. Yes, I could search for "python3*.dll" and load the one I find, but I'm writing this in C, and I get a migraine whenever I have to write more than about 15 lines of C code these

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2021-02-25 Thread Steve Dower
Steve Dower added the comment: Yeah, but in that scenario, it is just as good to LoadLibrary("python39.dll") and use it as if it was LoadLibrary("python3.dll") because the interaction model is identical. The only reason to load python3.dll explicitly is if you are not keeping it adjacent

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2021-02-25 Thread Eryk Sun
Eryk Sun added the comment: > I'm not sure we ever meant for LoadLibrary("python3.dll") to > actively load the concrete python3X.dll. IIRC, Paul Moore was doing something like this to create a script runner that loads "python3.dll", which runs as a regular application, not as a launcher for

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2021-02-25 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg387686 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2021-02-25 Thread Eryk Sun
Eryk Sun added the comment: > The APIs are the same, so you can (should) LoadLibrary the one > that you want. The issue is that python3.dll doesn't depend on python3x.dll in the normal way. For example, LoadLibraryExW("path/to/python3.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH) doesn't

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2021-02-25 Thread Steve Dower
Steve Dower added the comment: I'm not sure we ever meant for LoadLibrary("python3.dll") to actively load the concrete python3X.dll. The APIs are the same, so you can (should) LoadLibrary the one that you want. It's when you use static imports in extensions that it matters, but in that

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2021-02-25 Thread Eryk Sun
Eryk Sun added the comment: This issue affects Windows 7 and earlier, so I'm changing the affected version to Python 3.8, the last version to support Windows 7. I don't have access to Windows 7 currently. If someone has access to an updated Windows 7 installation (all required and optional

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Eryk Sun
Eryk Sun added the comment: I can confirm that LoadLibraryEx w/ LOAD_WITH_ALTERED_SEARCH_PATH unfortunately does not work in Windows 7. Actually I almost looked into this before on python-list: https://mail.python.org/pipermail/python-list/2016-September/thread.html#714622 but I got

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Eryk Sun
Eryk Sun added the comment: > Are you sure it really works on Windows 10? Neither the DLL35 nor DLL36 directory was set in PATH, nor any directory containing python3x.dll. Each of the latter two directories contained only the minimal set python3.dll, python3x.dll, and vcruntime140.dll. I ran

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
Elli Pirelli added the comment: I should perhaps clarify my sentence "As described, as long as forwarder.dll does not contain a import dependency on real.dll, loading forwarder.dll and doing GetProcAddress("Func") will fail, if real.dll is not in the standard DLL search path." What i tried

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
Elli Pirelli added the comment: It does not work on Windows 7 Pro x64. And i am not the only one. The maintainer of the "python-embedded-launcher" also encountered the issue (see discussion here: https://github.com/zsquareplusc/python-embedded-launcher/issues/3) Are you sure it really works

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Eryk Sun
Eryk Sun added the comment: LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH worked for me in Windows 10. I tested loading 64-bit python3.dll, for both 3.5 and 3.6, and getting the address of Py_Main. The DLLs were loaded from DLL35 and DLL36 subdirectories. It worked using both a relative

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
Changes by Elli Pirelli : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
New submission from Elli Pirelli: Let me first apologize if this issue has already been reported and discussed before. I would be surprised if there are not a few developers that had to deal with this issue before, but i was unable to find an existing bug report or discussion about this. So,