commit | e0b76952860808cd60d627882b564453f46c970c | [log] [tgz] |
---|---|---|
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | Fri Jan 04 02:04:15 2008 +0000 |
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | Fri Jan 04 02:04:15 2008 +0000 |
tree | d2c7f61794eb5f69d2cbbdbcb0818390ded6b203 | |
parent | d0d7d87869fb105ec3f849460d2c1b7f9fa851ec [diff] |
Partial port of r59682 from py3k. 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.