]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
On Windows, when import fails to load a dll module, the message says
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 3 Jan 2008 23:42:13 +0000 (23:42 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 3 Jan 2008 23:42:13 +0000 (23:42 +0000)
commitd6179e120d3ed98ec28cb5e4b6feabed2d670235
tree6585b427604d6aaeed44093618daaf99f512862c
parent819b8bf403f19017f9e7ea11cd83699b517f3394
On Windows, when import fails to load a dll module, the message says
"error code 193" instead of a more informative text.

It turns out that FormatMessage needs additional parameters for some error codes.
For example: 193 means "%1 is not a valid Win32 application".
Since it is impossible to know which parameter to pass, we use
FORMAT_MESSAGE_IGNORE_INSERTS to get the raw message, which is still better
than the number.

Also use the Unicode version of the API, to deal with accented letters.
Python/dynload_win.c