[issue24429] msvcrt error when embedded
eryksun
report at bugs.python.org
Wed Jul 15 07:06:25 CEST 2015
eryksun added the comment:
> windll.python27._Py_ActivateActCtx would suffice
It would instead be ctypes.pythonapi._Py_ActivateActCtx -- if the DLL exported a function with this name. ctypes.pythonapi is a PyDLL instance that wraps sys.dllhandle.
I think it would be more useful in general to add an "actctx" parameter to CDLL. Then make PyWin_DLLhActivationContext public in PC/dl_nt.c, and add it as sys.dllactctx. Example usage:
libc = CDLL('msvcr90', actctx=sys.dllactctx)
Along the lines of changing CDLL, it would also be nice to add a "flags" parameter and switch to using LoadLibraryEx. In comparison, POSIX users have easy access to the "mode" parameter (i.e. RTLD_LOCAL, RTLD_GLOBAL).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24429>
_______________________________________
More information about the Python-bugs-list
mailing list