[issue43022] Unable to dynamically load functions from python3.dll

Eryk Sun report at bugs.python.org
Mon Jan 25 16:43:14 EST 2021


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

> uses a code snippet like this.

PathAllocCombine() is Windows 8+, so sample code that uses it would only be for Python 3.9+.

I'd prefer the function pointer to be returned as an out parameter, and return an HRESULT status as the result. If LoadLibraryExW() or GetProcAddress() fails, map the error code via HRESULT_FROM_WIN32(GetLastError()). And log to stderr instead of exiting with an error() call.

----------

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


More information about the Python-bugs-list mailing list