diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-12-14 09:00:08 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-12-14 09:00:08 +0000 |
commit | 17a5fa1b4344199cef86c2cea4f1ba35f021593d (patch) | |
tree | a85bb7fdd3bbae60a1a69b2efa898ce949f8e2ac /dln.c | |
parent | 11187ce939d94c3a2f6d9239114c2696a8271834 (diff) |
1.1c final (hopefully)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r-- | dln.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1129,15 +1129,22 @@ dln_strerror() #ifdef _WIN32 static char message[1024]; + int error = GetLastError(); + char *p = message; + p += sprintf(message, "%d: ", error); FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, - GetLastError(), - MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), - message, - sizeof message, + error, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + p, + sizeof message - strlen(message), NULL); + for (p = message; *p; p++) { + if (*p == '\n' || *p == '\r') + *p = ' '; + } return message; #endif } @@ -1213,7 +1220,7 @@ dln_load(file) /* Load file */ if ((handle = LoadLibraryExA(winfile, NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) == NULL) { - printf("LoadLibraryExA\n"); + printf("LoadLibraryExA: %s\n", winfile); goto failed; } |