[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2016-07-09 Thread Keno Fischer
Keno Fischer added the comment: Yes, you are correct about it being only an issue in the embedding context. I agree that it might not be a good idea to do do this for every library, but I wanted to revive the discussion since this kind of thing seems like something that comes up frequently

[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2016-07-08 Thread Keno Fischer
Keno Fischer added the comment: pyzmq has a similar issue. I believe one solution would be to call `_Py_ActivateActCtx` in ctypes' load_library, i.e. do ``` #if HAVE_SXS ULONG_PTR cookie = _Py_ActivateActCtx(); #endif hMod = LoadLibraryW(name); #if HAV