Steve Dower added the comment:

In this case, it needs to load vcruntime for the python##.dll, so linking isn't 
going to make any difference. We need to statically link the loader, since it 
will be run independently and can't have any dependencies, but when it finds a 
Python install and loads the DLL directly it's not finding the vcruntime 
adjacent to the DLL. We'd have to statically link python##.dll.

SetDllDirectory would also work, though it's a little more complicated to get 
right. It's probably worth it here though to set the search path around the 
load in this case, as we know that nobody else is expecting the value to not 
change. However, it may break other loads if python##.dll calls it or makes 
assumptions about the search path (which it almost certainly does). Setting the 
working directory is likely to lead to a more reliable initial state.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26071>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to